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

27 views
Skip to first unread message

leemon

unread,
May 20, 2012, 12:22:38 PM5/20/12
to google-we...@googlegroups.com
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


leemon

unread,
May 24, 2012, 5:55:04 PM5/24/12
to google-we...@googlegroups.com
I figured this out. I needed to call driver.edit(myObject), then call driver.setConstraintViolations(myViolations)
Reply all
Reply to author
Forward
0 new messages