Hi all, is the error handling for a form within a zone working? I have a form configured in a zone like this:<div id="formzone" class="t-zone"> <form t:id="registerForm" zone="formzone" > <t:errors banner="literal:"/> .....
In you onValidateFromForm() method, you should return the zone when there are validation errors and the request is XHR (AJAX).
The code below is not tested, but you can get the idea anyway (I hope):
@Component
private Zone formzone;
@Inject
private Request request;
Object onValidateFromForm() {
// ... do your validation
if (form.getHasErrors() && request.isXHR() {
return formzone;
}
else {
return null;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
