Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added documentation for @DisableStrictChecks (added in 5.6.2)

...

Since
since5.3
Starting in release 5.3, Tapestry will throw an exception if the component identified for the event handler method doesn't exist in the containing component's template. This helps prevent typos. However, this behavior can be overridden using the @DisableStrictChecks annotation (added in release 5.6.2).


In the above example, the editDocument() method will be invoked when any event occurs in in the "edit" component (and has at least one context value).

...

Div
stylefloat: right; max-width: 30%; margin: 1em


Panel
borderColor#eee
titleBGColor#eee
titleJumpStart Demo

Handling A Bad Context

...



Tapestry triggers 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.

...

Div
stylemax-width: 30%; float: right; margin: 1em


Panel
borderColor#eee
titleBGColor#eee
titleJumpStart Demo

AJAX Components CRUD

...



If you want your own component to trigger events, just call the triggerEvent method of ComponentResources from within your component class.

...