Tapestry

Tapestry5 jQuery provides jQuery Components and can fully replace Prototype and Scriptaculous by jQuery

Tapestry5 JQuery

In this sample, we will create a DataTable using the ajax-mode, and with an extra column (called Action).

By default, it is impossible to render a block in the JSON-type response. We must implement our own implementation of the DataTableModel interface, and use the dataTableModel parameter of the dataTable component

The first thing to do is to add the new column in the Model : in the template (by using the t:add parameter) or in the Java Class (by using the t:model parameter), and to define the header of this new column

Then, we will create our own implementation of the DataTableModel Interface (just copy/past the default implementation : DefaultDataTableModel), and modify the JSON-type response, by adding the content of our new column (please check the getResponse method).

DataTable Sample
Last Name First Name Occupation Date Of Birth Action
Loading data from server
Last Name First Name Occupation Date Of Birth View