Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Moved anchor to a different location because original location didn't work.

...

You can return an object array, a list, even a single object. You may return objects instead of strings ... and toString() will be used to convert them into client-side strings.

...

Anchor
invoking-server-side-event-handler-methods-from-javascript
invoking-server-side-event-handler-methods-from-javascript

Invoking server-side event handler methods from JavaScript

Tapestry 5.4.2 introduced an API which makes it easy for server-side events to be invoked from JavaScript. On the server-side, you first need to annotate the event handler methods you want to expose with the @PublishEvent annotation. Then, in JavaScript, all you need to do is to call the existing t5/core/ajax function, but with slightly different parameters.

...