If an Editor doesn't satisfy an Entity's constraints, it calls
driverCtx.fire(new Receiver<Void>() {
> @Override
> public void onConstraintViolation(Set<ConstraintViolation<?>>
> violations) {
> dialog.setText("Errors detected");
> Driver.DRIVER.setConstraintViolations(violations);
> List<EditorError> editorErrors = Driver.DRIVER.getErrors();
> for (EditorError editorError : editorErrors) {
> Logger.getLogger("editorError.getMessage(): ").log(Level.INFO,
> editorError.getMessage() + ""); // prints two constraint violations
> }
> }
>
Are the constraint violations visualized in some way? Because I don't see
any visualizations....
Before firing the Receiver I do
final RequestContext driverCtx = Driver.DRIVER.flush();
if (Driver.DRIVER.hasErrors()) {
dialog.setText("Invalid input");
> return;
> }
but *Driver.DRIVER.hasErrors()* remains always *false* although *
onConstraintViolation* is executed when some fields are missing.
--
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/-/5Ev4rqgXgXMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.