I'm using GWT 2.5.0 and Request Factory.

I have configured a constraint to only apply on create (initial save) of my 
object.

This violation is not picked up by the default gwt request factory 
violation check mechanism - which kind of makes sense I guess, because it's 
in a group (I assume).

But it is thrown when I actually call my method.

So then what happens is that the violation exception is picked up as a 
server failure and not as a violation exception.

This is because in the 
SimpleRequestProcessor<https://gwt.googlesource.com/gwt/+/f67445d05502976f436a85ca971b8cb9661e6e48/user/src/com/google/gwt/requestfactory/server/SimpleRequestProcessor.java>
 and 
method void process(RequestMessage req, ResponseMessage resp). The check 
violations is called before the method is invoked. This is fine, except 
that because my violation is in a group and I've configured it via this 
group to only apply on create the violation is not picked up. It is only 
picked up when the actually method is called.

And there is no check to see if the _method_ throws a violation exception 
and then to deal with any violation exceptions actually thrown by my 
method...

Would it not be possible to add a try catch around my method being called 
and dealing with these violations the same as the "normal" violation 
exceptions?

Or maybe somebody can tell me how to configure the gwt request processing 
to handle these violation exceptions and send them to the client as 
violation exceptions?

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to