Creating Property Sets for Client-Side Controls

You can use the following code to create a property set for a control that Siebel Open UI displays in the client:

ClientCtrlPModel.prototype.UpdateModel = function(psInfo){
/// Specify the property set for the control
SiebelAppFacade.ClientCtrlPModel.superclass.UpdateModel.call( this, psInfo );
var variable_name= SiebelAppFacade.PresentationModel.GetCtrlTemplate
  ("control_name", "display_name", consts.get( "control_type" ), column_index );
    ctrlComboInfo.SetPropertyStr(consts.get("control_property"), 
"property_attribute")

where:

  • variable_name specifies the name of a variable.

  • control_name, display_name, control_type, and column_index are arguments of the GetCtrlTemplate method. For more information about these arguments, see GetCtrlTemplate Method.

  • control_property specifies a control property. For example, SWE_PROP_WIDTH specifies the width of the control, in pixels.

  • property_attribute specifies an attribute of the control that control_property specifies. For example, for the SWE_PROP_WIDTH property, a value of 200 sets the width of the control to 200 pixels.

For example, the following code creates a variable named ctrlComboInfo for the TestCombo control. It sets the width and height of this control to 200 pixels, and centers it

ClientCtrlPModel.prototype.UpdateModel = function(psInfo){   
/// Specify the property set for the control   
SiebelAppFacade.ClientCtrlPModel.superclass.UpdateModel.call( this, psInfo );   
ClientCtrlPModel.prototype.UpdateModel = function(psInfo){   
/// Specify the property set for the control   
SiebelAppFacade.ClientCtrlPModel.superclass.UpdateModel.call( this, psInfo );   
var ctrlComboInfo = SiebelAppFacade.PresentationModel.GetCtrlTemplate ("TestCombo",   
  "Test Drop Down", consts.get( "SWE_CTRL_COMBOBOX" ), 10 );   
    ctrlComboInfo.SetPropertyStr(consts.get("SWE_PROP_WIDTH"), "200")   
    ctrlComboInfo.SetPropertyStr(consts.get("SWE_PROP_HEIGHT"), "200")   
    ctrlChkboxInfo.SetPropertyStr(consts.get("SWE_PROP_JUSTIFICATION"), "center");

For more information about control_property and property_attribute, see Properties That You Can Specify for Client-Side Controls. For more information about other control properties that you can specify, such as Sort or Vertical Scroll, see the topic that describes the control Applet Object Type in Siebel Object Types Reference.