Thursday, May 24, 2012

Re: Editor framework - return error from proprietary server validation (not requestfactory)

I figured this out. I needed to call driver.edit(myObject), then call driver.setConstraintViolations(myViolations)

On Sunday, May 20, 2012 12:22:38 PM UTC-4, leemon wrote:
I am using the Editor framework combined with a proprietary rest-based back end. The objects returned from my back end service may contain validation errors (though not JSR 303 style errors). If I want to display these errors in my editor, do I just create my own implementation of ConstraintViolation and convert my own error format to a list of those?

I'm guessing the flow is:

1. user clicks save
2. call driver.flush()
3. if no errors, persist object to server
4. server returns object w/validation errors
5. call driver.setConstraintViolations(myViolations);
6. call driver.edit(myObject);

Is there anything else I need to do? Will this interfere with client-side validations?

thanks

leemon


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/xK-6Ry8dqrQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment