Defines an additional event-handler to execute as part of the current request. Can use the NAME attribute to determine whether or not a certain result should be executed, and the REDIRECT attribute to abort the current request and redirect to a different event handler.
Model-Glue will search the mappings listed in the ViewMappings setting (defined in the application's ColdSpring.xml file) in order, searching for the template defined in the TEMPLATE attribute.
Do (Required) - The NAME attribute of an event handler to add to this request.
Name (Optional) - If not set or set to an empty string, the event handler declared in the DO attribute will always be added to the request. If not empty, the event handler declared will only execute if a function in a Controller CFC uses the addResult() method of the Event API to add a result with the value of the NAME attribute.
Redirect (Optional, default = "false") - If true, a redirect will immediately redirect the entire request to the event handler declared in the DO attribute. All state value will be maintained if session is enabled.
Append (Optional, default = “”) - Used
to define a list of value names (from the viewstate) that should be appended
to the URL.
Example: If
APPEND is set to “articleId” and DO is set to “article,” the redirect
URL would be “index.cfm?event=article&articleId=[value of articleId]”.
Advanced, rarely used attributes:
PreserveState (Optional, default = "true") - If set to false and REDIRECT is set to true, the all state values will removed before redirecting to the event handler declared in the DO attribute
Reset (Optional, default="false") - If set to true, any previously declared results of the same name will be erased. This is only useful for redefining results added by scaffolds.
None