Thursday, November 28, 2013

RequestFactory + server side validation

Hi all, 

I'm using GWT version of 2.5.1 with RequestFactory and EditorFramework.
Today I tried set up the Validation and its working fine at client side but the server side is not.
The main problem, I found one usable sample from GWT trunk, but it use the GWT-RPC not RequestFactory: 

 public SafeHtml greetServer(Person person) throws IllegalArgumentException,
      ConstraintViolationException {
    // Verify that the input is valid.
    Set<ConstraintViolation<Person>> violations = validator.validate(person,
        Default.class, ServerGroup.class);
    if (!violations.isEmpty()) {
      Set<ConstraintViolation<?>> temp = new HashSet<ConstraintViolation<?>>(
      throw new ConstraintViolationException(temp);

 but this way is caused 
       java.lang.RuntimeException: Server Error: null

with RequestFactory.

So, the question is, what is the proper way to use that with RF at server side ?

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment