JSPagedLoop

JSPagedLoop component loops an iterable list of values and allows you to immediately jump to a particular page index within the overall data set without page submit.
The component also allows you to add hidden items which can be displayed by clickin the "Add" link (again, without form submit).

Parameters of the component :

  • clientId : the client id.
  • source : defines the collection of values for the loop to iterate over.
  • value : the current value.
  • volatile : same as standard Loop component.
  • index : the index into the source items.
  • elementName : The element to render. If not null, then the loop will render the indicated element around its body (on each pass through the loop). The default is derived from the component template.
  • rowsPerPage : the number of rows of data displayed on each page.
  • additionalRowCount : additional rows which can by dynamically added by Java Script.
  • addRowLinkTitle : title of the "Add" link.
  • objectCreatorDelegate : instance of org.equanda.tapestry5.base.ObjectCreatorDelegate which allows to create new object and add it to the collection.

To component can be passed set of block parameters: "empty" and "bottomBlock". "empty" block will be displayed when value collection is empty. "bottomBlock" will be displayed instead of the Java Script "Add" link when all additional rows are visible.


<div t:id="pagedLoop" t:type="equanda/JSPagedLoop" source="1..10" value="current" volatile="true" index="index" rowsPerPage="2" additionalRowCount="2" addRowLinkTitle="Add" objectCreatorDelegate="prop:this">
<t:parameter name="empty"></t:parameter>
<t:parameter name="bottomBlock">
<t:equanda.formactionlink t:id="Add">Add</t:equanda.formactionlink>
</t:parameter>
<p>Current loop value is: ${current}</p>
</div>
  • 1. JSPagedLoop