xforms:recalculateAdded by IBM on October 10, 2012 | Version 1 (Original)
|Causes the forms viewing application to recalculate any instance data that is affected by computations and is not up-to-date. This affects all data instances in the designated model.
In general, the XForms processor automatically runs this action when required. As such, this action is included mostly for completeness.
Table 1. recalculate parameters
<xforms:recalculate event model="model"/>
|event||string||The XForms event that triggers the action.|
|model||string||The ID of the model to recalculate. If the model attribute is omitted, then the default model is used.|
Example The following button recalculates model X when clicked:
<xforms:recalculate ev:event="DOMActivate" model="X"/>
- This feature is most likely to be used on scaled-down XForms processors, in which the implicit rebuild-recalculate-revalidate-refresh sequence is not implemented because of limited resources. In this case, explicit requests for these actions may force an exchange with a server.
- Normally, recalculation occurs at the end of an action sequence. 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.