Community articleUFLXMLModelUpdate function
Added by IBM contributorIBM on August 16, 2011
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.



Description

This function updates the XML data model in the form. This is necessary if computes have changed the structure of the data model in some way, such as changing or adding bindings. These sorts of changes do not take effect until the UFLXMLModelUpdate function is called.

Function

   r_short UFLXMLModelUpdate(
      formNodeP aNode
   );


Parameters

Table 1. Function parameters
ExpressionTypeDescription
aNodeformNodePAny node in the form.


Returns

OK on success or an error code on failure.

Example

The following example uses UFLSetLiteralByRefEx to change a binding in the form, so that it binds to a different option. It then calls UFLXMLModelUpdate so that the data model reflects the change.
The sample code uses setLiteralByRefEx to change the binding in the form, then calls xmlModelUpdate so that the XML data model reflects the change.
   r_error setBinding(theForm)
   {
      if (UFLSetLiteralByRefEx(theForm, NULL,
         "global.global.xmlmodel [bindings] [0] [boundoption]", 0, NULL, NULL,
         "PAGE1.FIELD5.value") == NOTOK)
      {
         fprintf(stderr, "Could not set literal value in binding.");
         return(NOTOK);
      }
      if (UFLXMLModelUpdate(theForm) == NOTOK)
      {
         fprintf(stderr, "Could not update XML model.");
         return(NOTOK)
      }
      return(OK)
   }


Parent topic:
FormNodeP functions