The recalculate element
This action causes the default processing of xforms-recalculate to happen, bypassing the normal event flow (i.e. the behavior occurs without dispatching the xforms-recalculate event).
As a result, instance data nodes whose values need to be recalculated are updated as specified in the processing model.
In general, the XForms processor automatically runs this action when required (e.g. at the end of an action sequence). As such, this action is included mostly for completeness.
However, the form author may need to force an earlier recalculation if there is a setvalue action whose XPath references depend on the recalculated results of prior setvalue actions.
Example
XML | Copy Code |
---|---|
<xforms:trigger> <xforms:label>Recalculate</xforms:label> <xforms:recalculate ev:event="DOMActivate" model="x"/> </xforms:trigger> |
Attributes
Name | Required / optional | Description |
---|---|---|
model | optional | XForms model selector, as defined in Single Node Binding Atttributes. If this attribute is omitted, then the default is the model associated with the in-scope evaluation context node. |
Common Attributes | optional | Any attribute from the Common Attributes collection (e.g. id). |
XML Events | optional | Any attribute from the XML Events collection (e.g. ev:event) |
Common Action Attributes | optional | Any attribute from the Common Action Attributes collection (if or while) |
Content
TheĀ recalculate element does not allow any content.
Specification
Link to the XForms specification: the recalculate element.