xforms:repeatAdded by IBM on October 10, 2012 | Version 1 (Original)
|Creates a template row of items for a table. These items are then duplicated for each row the user adds to the table, and for each row of data that exists in the XForms data model.
Table 1. xforms repeat parameters
<xforms:repeat id="name" nodeset_binding
|name||string||an arbitrary name that you assign to the table. All names assigned to id attributes must be globally unique within the form.|
|nodeset binding||string||See Nodeset binding.|
|index||integer||This determines which row of the repeat receives the focus initially.
|XFDL Items||XFDL||the XFDL items that should appear in each row of the table. This can include nested grouping items, such as table and pane, as well as non-XForms items, such as line.|
Example The following example shows a table that uses an xforms:repeat to create a row of data that you might find in a purchase order. This row contains: a popup that lets the user select which item to purchase, a field that lets them enter a quantity for the item, and a label that displays the cost of the item.
<xforms:select1 appearance="minimal" ref="product">
- To add or remove rows from a table, you must use the xforms:insert and xforms:delete actions respectively. For more information about these actions, refer to XForms actions.
- An xforms:repeat maintains an internal index that indicates which row has the focus. When the focus is sent to the table, it automatically goes to the indexed row. The index is one-based, so that the first row has an index of 1, the second row an index of 2, and so on. You can change the index by using the xforms:setindex action.
- When using computes with a repeat, the following rules apply:
If the nodeset binding of the xforms:repeat is empty or contains non-relevant nodes, then the xforms:repeat provides a default of false to the table's visible option.
- Computes written within a row may not reference elements in a different row.
- Computes written outside a row may not reference elements within a row.