There is no constructor that allows me setting my own SimpleRequestProcessor.
I think, in that case it would be better, not to change the GWT-s code, but to catch the ContraintViolationException when persistence provider is called and to return an object with constraint violations inside indicating if request was processed properly or not. That will cause calling client's onSuccess() method, instead of onConstraintViolation() but in my opinion it is better than modifying the GWT-s code.
See last comment in this post:
https://groups.google.com/forum/#!topic/google-web-toolkit/E9wvMRGwFtI
Thank you very much for helping me to understand this process.
Nermin
Am Freitag, 2. August 2013 10:29:30 UTC+2 schrieb Jens:
--So now:
How do I propagate ConstraintViolationException from my CustomRequestFactory correctly to the client so that Receiver.onConstraintViolation() is called on the client? As already said you should customize RequestFactoryServlet to use your own version of SimpleRequestProcessor. SimpleRequestProcessor already has validation code and you would need to adapt this code for the service invocation. Basically you must set violations into the ResponseMessage.-- 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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment