Marks a method as a handler for a client side event. The handler method will be invoked when a
component triggers an event. Filters on the type of event and on the originating component ensure
that only the appropriate methods are invoked.
Client events include a context of one or more values. These context values are
included in the action URI. The values are optionally supplied to the handler method as
parameters. Automatic type coercions from string to the type of the actual parameter occur.
Handlers may return a value. Returning a non-null value will abort the handling of the event, and
will usually control the response sent to the client web browser. The details are somewhat
specific to the type of event and the component involved.
If a handler is not found within the originating component (or no handler aborts the event
handling), then handlers within the containing component will be searched. This continues up the
page hierarchy. In some cases, having no handlers (or no aborting handlers) is considered
acceptible; in others, it is an error. Again, this is defined by the type of originating
component, and the type of event.
If you fail to provide filters on either component or event type, then your method will
be invoked for all component events, possibly including events that bubble up from embedded
sub-components.
|