-
Notifications
You must be signed in to change notification settings - Fork 3
Event object
For every event, and in some other instances, a new Event object is created. Handling a request also begins with an event. Additionally, during the event handling other events can be dispatched, which leads to new Event instances.
You can use an Event object just like a struct in the event handlers in your controllers, to pass information on to subsequent tasks. The object itself is not passed to view templates. Views only receive a properties struct, obtained with getProperties().
The Event object has the following methods:
Returns the target of the event.
Returns the event type.
Cancels the event, and stops subsequent task execution for this event.
Returns whether or not the event is canceled.
Resets the canceled state of the event.
Returns a struct containing all the data that is put on the object.
Appends the data in the struct on the object. Existing data is not overwritten.
Aborts event execution. This does not abort the request, control is given back to the caller (usually Application.cfc).
Applicable to tasks that run within a thread (defined with <thread>). Returns true if the thread will rejoin the page thread by means of a join action (or if it is the page thread itself). If a join action expires (or if no join action is issued), this method returns false.