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