how to open a modal window from IValidator.validate since as it stands it does not handle ajax (as far as my limited knowledge goes).
With AjaxRequestTarget.get() your validator can get hold of the current ART (if present). Or leave the EmailAddressValidator on the TextField and do the rest in AjaxSubmitButton#onSubmit(): onSubmit(AjaxRequestTarget target) { // address is already valid, else this method wouldn't be called if (isAddressUsed()) { openModalDialog(); } else { goOn(); } } Sven On 08/17/2012 01:44 PM, lucast wrote:
Thanks Sven, I'm afraid I don't know how to open a modal window from IValidator.validate since as it stands it does not handle ajax (as far as my limited knowledge goes). I have moved email address validation to form.onValidate() and implemented it in the following manner: if ( ! EmailAddressValidator.getInstance().getPattern().matcher( email ).find() ){ ... I just thought one could perhaps, within AjaxFormComponentUpdatingBehavior.onError determine which validator is complaining out of a group that have been assigned to a field. Thanks, Lucas -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-Ajax-Validation-to-Individual-Form-components-Distinguishing-error-from-multiple-validators-tp4651319p4651329.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org