After a form submission operation—create, update, or delete—is complete, the action attribute of the dsp:form tag specifies the page to display. You might want to specify several different pages, where the user’s destination depends on the nature of the form operation and whether or not it succeeds.

A RepositoryFormHandler has a set of properties you can use to control navigation after a form operation. These properties specify the URLs where the user is redirected on certain error and success conditions. Each submit operation has the corresponding success and failure URL properties:

RepositoryFormHandler operation

Success/failure URL properties

create

createSuccessURL
createErrorURL

update

updateSuccessURL
updateErrorURL

delete

deleteSuccessURL
deleteErrorURL

The value of each property is a URL relative to the page specified by the form’s action attribute or a local URL defined absolutely from the root. The default value of each property is null, so you must set these properties explicitly. You can specify the values of these URL properties in the form handler component, or with hidden input tags in the JSP. If these property values are not set, the action-specified page is displayed on form submission.

For example, the following hidden input tag redirects users to updateStockFailure.jsp in the event that an update operation fails:

<dsp:input type="hidden"
bean="atg/dynamo/droplet/MyRepositoryFormHandler.updateErrorURL"
value="updateStockFailure.jsp"/>