Development tools : XUI editor : Editing an XUI page : Editing the properties of the XUI widgets : Defining cross-field validation in a form : Synchronizing the isMandatory values of form inputs between client and server
  
Synchronizing the isMandatory values of form inputs between client and server
1 Enable the cross-field validation from server side are enabled by default. Make sure these codes are in btt.xml:
in the HTML section:
<field id="serverXValidation" value="true" />
in the formatter's class table section:
<field id="condition" value="com.ibm.btt.form.xval.FormXValidation" />
<field id="xValConditions" value="com.ibm.btt.form.xval.FormXValidations" />
2 Update the ECA RuleLabelProvider to support the decoration:
This graphic is described in the surrounding text.
If ECA condition is the headless condition and it only contains action (include true/false actions) which modifies the “isMandatory” value of an input widget, the tooling displays a decoration icon in the ECA rule Label but not in the rest of ECA rules. The <mandatories> ID is same with the ECA rule ID.
This graphic is described in the surrounding text.
Note The headless icon dynamically updates if the ECA value changes.
3 See the following generate relationship:
This graphic is described in the surrounding text.
An xml file that contains the ECA rules will be generated in definitions/operations/. Keep the feature on and then the server side will use the ECA rules in this file to update the isMandatory properties.
Go up to
Defining cross-field validation in a form