> But i don't think it matters to much. Because most have the form.submit OR a
> button.submit() implemented.
Well, I use both sometimes and actually like the option of being able
to have a common piece in onSubmit (e.g. navigation or save), and some
specific behavior in the button.
i have a couple of usecases.
one i have some very complex validation that would be difficult to express as a formvalidator because the form is dynamic. right now there is no good place for it because form.onsubmit runs last and we dont have form.onvalidate callback - i can override form.validate but then you must remember to call super() as i mentioned - so i dont think this is very safe.
another usecase is where i have a form that has to preprocess some data. i reuse this form in a lot of places so i would like to encapsulate that prepreocessing logic in the form's onsubmit which is intuitive, but then i cant. i have 5 buttons in some cases on this form, so i need to call a util method on the form from each button which is very ugly.
-Igor
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Wicket-develop mailing list Wicket-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-develop