Skip to content

Commit

Permalink
WICKET-7141 Add hook method afterUpdateFormComponentModels() in Form …
Browse files Browse the repository at this point in the history
…process
  • Loading branch information
florianlacreuse committed Jan 22, 2025
1 parent fd11176 commit 495fb16
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,9 @@ public void process(IFormSubmitter submittingComponent)
// Update model using form data
updateFormComponentModels();

// after updating, call the interception method for clients
afterUpdateFormComponentModels();

// validate model objects after input values have been bound
internalOnValidateModelObjects();
if (hasError())
Expand Down Expand Up @@ -1297,6 +1300,14 @@ protected void beforeUpdateFormComponentModels()
{
}

/**
* Template method to allow clients to do any processing after the actual updating of form
* component models is done.
*/
protected void afterUpdateFormComponentModels()
{
}

/**
* Called (by the default implementation of 'process') when all fields validated, the form was
* updated and it's data was allowed to be persisted. It is meant for delegating further
Expand Down

0 comments on commit 495fb16

Please sign in to comment.