Designer 10.15 | webMethods CAF and OpenUI Development | Understanding the Client-side Model | CAF.Model
 
CAF.Model
The client-side CAF.model(id) creates a model object for each control rendered on a page. All control IDs used by the Composite Application Framework client-side model are client-side IDs that are different from and related to server-side IDs that developers specify at design time. Client-side IDs are generated at run time. You can map client-side IDs in one of two ways:
*In your Java code, by calling the getClientId() method of the javax.faces.component.UIComponent object. This method gets the client-side ID of the control represented by the UIComponent object.
*In a binding expression, by referencing the clientId content provider on any page bean,#{activePageBean.clientIds['myControlId']}. This approach produces a client-side ID for any given server-side ID.
The client-side model objects produced by the CAF.model() enable manipulating controls without knowledge of the DHTML implementation of the controls. The model itself holds no state. Every invocation of CAF.model() creates a new model instance. The model simply exposes methods that enable examining and modifying the state of the modeled control.
All models have the following standard, read-only properties:
*ID
*Element - controls the primary HTML element
*form.ID - the client-side ID of the control
Form is the control's containing HTML form element when the control is contained by a form.
For more information about CAF controls, see webMethods CAF Tag Library Reference.
Related Topics