|modelID||String||The ID of the model to update. If null or empty, the default model is updated.|
|instanceXPathExp||String||The XPath expression to resolve. If null or empty, then the current context node is assumed.|
|nsNode||FormNodeP||The namespace context for the XPath resolution. If null, then this parameter will default to the FormNodeP object that this function is being called on.|
|updateFlags||int||Specifies the behavior of the function. Must be one of the following values:
0 — Default behavior is performed. If the XForms processor is on, then updates are automatically implemented after a change is made to the data. See the "Notes" section for details.
XFDL.UFL_XFORMS_DEFER MODEL_UPDATE — Marks the model for a deferred update. In a deferred update, the data model is not changed immediately; instead, the model is flagged to indicate that there are changes that need to be implemented. To enact a deferred update and implement the changes to the model, use the xFormsModelUpdate method.
XFDL.UFL_XFORMS_SUPPRESS_MODEL_UPDATE — Prevents any automatic updating of the model. See the "Notes" section for usage details.
Note: You can only use the XFDL.UFL_XFORMS_DEFER MODEL_UPDATE and XFDL.UFL_XFORMS_SUPPRESS_MODEL_UPDATE flags when XForms processing is turned on.
|extensionPath||String||Name of an element or attribute to be created. This new element or attribute is created as a child of the node that is specified by instanceXPathExp. Supported values include the name of the new child element and the @name of the new child attribute.
For example, entering Title as a value would create an element called "Title", while entering @Title would create an attribute called "Title".
|updateValue||String||The value to set into the given node during the update process.|
BooleanHolder completed = new BooleanHolder();
String pathToForm= "example.xfdl";
// load form with server-speed + XForms flags
FormNodeP theForm = this.theXFDL.readForm(pathToForm, XFDL.UFL_SERVER_SPEED_FLAGS_WITH_XFORMS);
String result = theForm.extractXFormsValue(null, "sum(shoppingCart/line[@toShip]/lineTotal) > 100.0 and address/US/state != 'AK' and address/US/state != 'HI'", null, 0, completed);
if (completed.value == true && result.equals("true"))
theForm.updateXFormsValue(null, "instance('shipping')/insurance", null, 0, "@cost", "0.00");