Skip to content

Commit 495fb16

Browse files
WICKET-7141 Add hook method afterUpdateFormComponentModels() in Form process
1 parent fd11176 commit 495fb16

File tree

1 file changed

+11
-0
lines changed
  • wicket-core/src/main/java/org/apache/wicket/markup/html/form

1 file changed

+11
-0
lines changed

wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java

+11
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,9 @@ public void process(IFormSubmitter submittingComponent)
10061006
// Update model using form data
10071007
updateFormComponentModels();
10081008

1009+
// after updating, call the interception method for clients
1010+
afterUpdateFormComponentModels();
1011+
10091012
// validate model objects after input values have been bound
10101013
internalOnValidateModelObjects();
10111014
if (hasError())
@@ -1297,6 +1300,14 @@ protected void beforeUpdateFormComponentModels()
12971300
{
12981301
}
12991302

1303+
/**
1304+
* Template method to allow clients to do any processing after the actual updating of form
1305+
* component models is done.
1306+
*/
1307+
protected void afterUpdateFormComponentModels()
1308+
{
1309+
}
1310+
13001311
/**
13011312
* Called (by the default implementation of 'process') when all fields validated, the form was
13021313
* updated and it's data was allowed to be persisted. It is meant for delegating further

0 commit comments

Comments
 (0)