Name

setindex

Synopsis

Every repeat set keeps track of a current item, similar to a database cursor. The official term for this is the index. The index item behaves for multiple form controls much as a focus behaves for single form controls. In fact, setting the focus to a form control in a repeat set also adjusts the index to that spot. This action explicitly changes the index.

Two attributes control the behavior of this element: repeat, which takes an IDREF of a repeat set, and index, which takes an XPath expression that evaluates to a number, just as the as attribute on insert and delete.

setindex is used like this:

<setindex repeat="repeat_id" index="1" ev:event="xforms-ready"/>

Get XForms Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.