if the form is invalid your button's onsubmit() wont get fired... -igor
On Wed, Mar 14, 2012 at 1:53 PM, Thomas Götz <t...@decoded.de> wrote: > Hi! > > I have the following situation: > > I have a form containing several FormComponents and Validators, submitted via > Ajax. Then I have an AjaxButton on the same page (outside the form) which > triggers some backend logic. But it should only do so if the mentioned form > had no validation errors during the last submit. How should I check that? > Form.hasError() only checks for error messages, which always returns 'false' > as the error messages already have been rendered in one of the preceding > requests. > > Is it a good idea to set a flag in the Form (boolean isValid) upon > onSubmit/onError and check for that flag or is there some already provided > Wicket mechanic I could use? > > Cheers, > -Tom > > > --------------------------------------------------------------------- > 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