When generating search forms or generating object details forms based on the presentation layer data objects defined in the model, the generated forms will already have all the controls properly bound to the corresponding data properties. However, if you want to customize the generated data objects by adding new data properties, then you may need to be able to manually add controls to the form and bind them to the corresponding data properties. This also applies if you're building your form from scratch and need to bind the controls to the underlying data properties.
Binding a UI control to a Data Property is extremely easy with Xomega Framework in any of the supported UI technologies. It generally boils down to the following simple steps:
- Set a special attribute to the data property name in the object.
- If you want to bind to a data property that is defined on a child object of the current context object, then you can set a special attribute to indicate a child object's name or a dot-delimited path to it.
- Optionally set a special attribute to indicate the label element associated with this control. This will allow Xomega Framework to show or hide the label along with the control and possibly highlight the label for required properties.
The following topics detail these steps for each individual UI technology.