Control State Manipulation
The manipulation of the DOM state of a control occurs in a single call in the control’s wrapper element using the SetState API. In some earlier releases, this type of manipulation could have been done in many different ways. Therefore, you might need to locate and modify any outdated custom renderer code.
To find and modify the control state manipulations in your custom renderer code
-
Determine if you have code similar to the following:
$('[name="' + control.GetInputName() + '"]').hide();
-
Replace all instances of calls similar to code discovered in Step 1 by a call to the control's plug-in wrapper that internally affects the state of the element and hides it. Use the following code as guidance:
this.GetUIWrapper(control).SetState(consts.get("SHOW"), false);
-
Determine if you have code similar to the following:
$('[name="' + control.GetInputName() + '"]').attr("readOnly", "readOnly");
The code here is a case where a particular control is being made non-editable on the DOM.
-
Replace all instances of calls similar to code discovered in Step 3 using following convention:
this.GetUIWrapper(control).SetState(consts.get("EDITABLE"), false);
-
Determine if you have code similar to the following:
$('[name="' + control.GetInputName() + '"]').focus();
The code here is a case where there is an attempt to set focus on a particular control.
-
Replace all instances of calls similar to code discovered in Step 5 using following convention:
this.GetUIWrapper(control).SetState(consts.get("FOCUS"), true);
The SetState API exists in the prototype space of the plug-in wrapper and can also be overridden in a custom plug-in wrapper to be used to affect the functionality of setting states on the control.
For more information about state modification, including parameters accepted by SetState, and the modifications made to the control element, see Architecture of Siebel Open UI and Application Programming Interface.