xforms-model-construct-doneAdded by IBM on October 10, 2012 | Version 1 (Original)
|Occurs when the forms viewing application has finished constructing the XForms model. This occurs just after the form is opened, and always completes before the user can interact with the form.
Available In <xforms:model> element
Example The following model contains data for a purchase order form. The data begins with a single template row which is set to be non-relevant by a bind. This means the row is not visible in the form. When the form is first opened, the forms viewer will construct the XForms data model, creating a table with a single invisible row in it. When it has completed building the model, an xforms-model-construct-done event occurs. This triggers the xforms:insert action, which duplicates the template row so that there is a visible row that the user can work with.
<xforms:instance id="po" xmlns="">
<xforms:bind nodeset="order/row [last()]" relevant="false()"/>
nodeset="order/row [last()=1]" at="1" position="before"/>
- The xforms-model-construct-done event is appropriate for initializing data because the user interface has not yet been processed (that is, repeats have not been expanded, and form controls have not been recognized). However, because the user interface layer is not yet available, actions that operate on the UI layer are not appropriate in event handlers for this event. For example, toggle, setfocus and setindex will not work. To initialize the user interface, use the xforms-ready event instead.