The refresh element

Release 2.0 - ...

This action causes the default processing of xforms-refresh to happen, bypassing the normal event flow (i.e. the behavior occurs without dispatching the xforms-refresh event).

This action results in the XForms user interface being refreshed, and the presentation of user interface controls being updated to reflect the state of the underlying instance data.

In general, the XForms processor automatically runs this action when required. As such, this action is included mostly for completeness.

However, if you are performing a number of consecutive submissions, refresh may be useful for updating the form to show progress, especially after submissions that return data to the form.

Example

XML CopyCode image Copy Code
<xforms:trigger>
   <xforms:label>Refresh</xforms:label>
   <xforms:refresh 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 refresh element does not allow any content.

Specification

Link to the XForms specification: the refresh element.