Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed ../apidocs/ links

...

Tapestry 5 introduces the concept of event handler methods, identified via a naming convention, or via the OnEvent annotation. Event handler methods may have any visibility, even private. Normally they are given package private visibility, to support testing.

...

When an event handler method is invoked, the strings are converted back into values, or even objects. A ValueEncoder is used to convert between client-side strings and server-side objects. The ValueEncoderSource service provides the necessary value encoders.

...

To designate that an event handler method should be invoked regardless of how many context parameters are available, change the method to accept a single parameter of type Object[], type List, or type EventContext.

Event Bubbling

The event will bubble up the hierarchy, until it is aborted. The event is aborted when an event handler method returns a non-null value.

...

Tapestry fires a new event, of type "exception", passing the thrown exception as the context. In fact, the exception is wrapped inside a ComponentEventException, from which you may extract the event type and context.

...

If there is no exception event handler, or the exception event handler returns null (or is void), then then the exception will be passed to the RequestExceptionHandler service, which (in default configuraton) will be render the exception page.