PROBLEM
An operation is a specific set of logic that handles a user-generated event. There are occasions where an Operation may be reused in different contexts. There needs to be a strategy for reusing an Operation in a different context and associating it with a different View.
SOLUTION
A controller allows for multipe URL mapping entries to the same Operation. As the long as the URL is unique, addition URL mappings can be added to the controller and configured to the same Operation. In this scenario the developer mat also want to specify a different View for the Action.
HOW IT WORKS
The following two URL mappings are configured for the same operation but different views.
Example 2.5. URL Mapping - Reusing Actions
In both cases the LoadHistory operation is being invoked, however a different URL and View are specified in the URL Mapping.
RELATED RECIPES