The xforms-scroll-first and xforms-scroll-last events
Release 2.0 - ...
Dispatched in response to: a setindex action attempting to set an index outside the range of a repeat.
Event Properties
Event Properties | Value / Description |
---|---|
Target | repeat |
Bubbles | Yes |
Cancelable | No |
Context Info | None |
The default action for this event results in the following:
- None, notification event only.
Example
XML | Copy Code |
---|---|
<xforms:trigger> <xforms:label>Scroll First</xforms:label> <!-- decrement the index by 500, which should be out of range --> <xforms:action ev:event="DOMActivate"> <xforms:setindex repeat="repeat_001" index="index('repeat_001')-500"/> </xforms:action> </xforms:trigger> <xforms:trigger> <xforms:label>Scroll Last</xforms:label> <!-- increment the index by 500, which should be out of range --> <xforms:action ev:event="DOMActivate"> <xforms:setindex repeat="repeat_001" index="index('repeat_001')+500"/> </xforms:action> </xforms:trigger> <xforms:repeat id="repeat_001" nodeset="/carColors/color" startindex="1"> <xforms:group> <xforms:label></xforms:label> </xforms:group> </xforms:repeat> <xforms:action ev:event="xforms-scroll-first" ev:observer="repeat_001"> <xforms:message level="modal">xforms-scroll-first</xforms:message> </xforms:action> <xforms:action ev:event="xforms-scroll-last" ev:observer="repeat_001"> <xforms:message level="modal">xforms-scroll-last</xforms:message> </xforms:action> |
Specification
Link to the XForms specification: the xforms-scroll-first and xforms-scroll-last events.