Pre persist validation are handled by your persistence provider on the fly 
whenever you try to persist an entity. The downside is that your 
persistence provider will probably throw exceptions if validation fails 
which causes RequestFactory to call Receiver.onFailure() on the client 
because your server side service method throws an unexpected exception now.

I think there is no viable solution for pre-persist validation. You could 
probably modify RequestFactory on server side and let it catch any 
ConstraintViolationException during the service method invocation phase and 
then propagate them correctly to the client so that 
Receiver.onConstraintViolation() is called on the client. To do so you 
would need to copy RequestFactoryServlet and SimpleRequestProcessor from 
the GWT SDK into your project and patch them to your needs.

Not sure if there are other ways to solve this.

-- J.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to