Author: ivaynberg Date: Fri Oct 10 15:47:46 2008 New Revision: 703593 URL: http://svn.apache.org/viewvc?rev=703593&view=rev Log: added onvalidate callback
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java?rev=703593&r1=703592&r2=703593&view=diff ============================================================================== --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java Fri Oct 10 15:47:46 2008 @@ -1971,18 +1971,27 @@ * that can be added using addValidator(). * </p> */ - protected void validate() + protected final void validate() { if (isEnabled() && isEnableAllowed() && isVisibleInHierarchy()) { // since this method can be called directly by users, this additional check is needed validateComponents(); validateFormValidators(); + onValidate(); validateNestedForms(); } } /** + * Callback during the validation stage of the form + */ + protected void onValidate() + { + + } + + /** * Triggers type conversion on form components */ protected final void validateComponents() @@ -2098,6 +2107,7 @@ { form.validateComponents(); form.validateFormValidators(); + form.onValidate(); return CONTINUE_TRAVERSAL; } return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;