Skip Headers
Siebel CRM Configuring Siebel Open UI
Siebel Innovation Pack 2015
E52417-01
  Go to Documentation Home
Home
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
    View PDF

Methods of the Siebel Open UI Application Programming Interface

This topic describes the methods of the Siebel Open UI Application Programming Interface. You can use them to customize Siebel Open UI. It includes the following information:

Presentation Model Class

This describes the methods that Siebel Open UI uses with the PresentationModel class. It includes the following information:

Siebel Open UI defines the PresentationModel class in the pmodel.js file.

AddComponentCommunication Method

The AddComponentCommunication method binds a communication method. It uses the following arguments:

  • methodName is a string that identifies the communication method that Siebel Open UI binds.

  • targetMethod is a string that identifies the method that Siebel Open UI calls after methodName finishes. It calls this target method in the presentation model context.

  • targetMethodConfig identifies an object that contains configuration properties for targetMethod.

  • targetMethodConfig.scope identifies the object that the AddComponentCommunication method binds. This object must reference the targetMethod.

  • targetMethodConfig.args is a list of arguments that Siebel Open UI sends to targetMethod when the AddComponentCommunication method runs.

AddLocalString Method

The AddLocalString method adds a text string. It uses the following syntax:

AddLocalString(ID, custom_string)

where:

  • ID is a string that you use to reference the custom_string. You can use any value for ID.

  • custom_string is any text string.

For example:

this.AddMethod("AddLocalString", function (my_text, this is my custom text) {
SiebelApp.S_App.LocaleObject.AddLocalString(my_text, this is my custom text);
return value;
});

This code adds a string named my_text that includes the following string value:

this is my custom text

AddMethod Method

The AddMethod method adds a method to a presentation model. You can use ExecuteMethod to run the method that AddMethod adds from the presentation model or from the physical renderer. If AddMethod attempts to add a new method that the predefined client already contains, then the new method becomes a customization of the predefined method, and this customization runs before or after the predefined method depending on the CancelOperation part of the return value.

A method that customizes another method can return to the caller without running the method that it customizes. To do this, you configure Siebel Open UI to set the CancelOperation part of the return value to true. You set this property on the ReturnStructure object that Siebel Open UI sends to each method as an argument. For an example that does this configuration, see "Customizing the Presentation Model to Identify the Records to Delete".

The AddMethod method returns one of the following values:

  • True. Added a method successfully.

  • False. Did not add a method successfully.

It uses the following syntax:

AddMethod("methodName",methodDef(argument, argument_n){
}, {methodConfig:value});

where:

  • methodName is a string that contains the name of the method that Siebel Open UI adds to the presentation model.

  • methodDef is an argument that allows you to call a method or a method reference.

  • argument and argument_n are arguments that AddMethod sends to the method that methodDef identifies.

  • methodConfig is an argument that you set to one of the following values:

    • sequence. Set to one of the following values:

      • true. Siebel Open UI calls methodName before it calls the method that already exists in the presentation model.

      • false. Siebel Open UI calls methodName after it calls the method that already exists in the presentation model. The default value is false.

    • override. Set to one of the following values:

      • true. Siebel Open UI does not call the method that already exists in the presentation model. Instead, it calls the sent method, when necessary. Note that Siebel Open UI can never override some methods that exist in a predefined presentation model even if you set override to true.

      • false. Siebel Open UI calls the method that already exists in the presentation model.

    • scope. Describes the scope that Siebel Open UI must use when it calls methodDef. The default scope is Presentation Model.

Example of Adding a New Method

The following code adds a new ShowSelection method:

this.AddMethod("ShowSelection", SelectionChange,{sequence : false, scope : this});

After Siebel Open UI adds the ShowSelection method, you can use the following code to configure Siebel Open UI to call this method. It sends a string value of SetActiveControl to the sequence and a string value of null to the scope argument. To view how Siebel Open UI uses this example, see Step 5:

this.ExecuteMethod("SetActiveControl", null)

Example of Using the Sequence Argument

The following code configures Siebel Open UI to attach a method. It calls this method anytime it calls the InvokeMethod method of the proxy:

this.AddMethod("InvokeMethod", function(){    }, {sequence : true});

This code sets the sequence argument to true, which configures Siebel Open UI to call the method that it sends before it calls InvokeMethod. The method that it sends gets all the arguments that InvokeMethod receives. For more information, see "InvokeMethod Method for Presentation Models".

Example of Overriding the Predefined Presentation Model

The following example overrides the predefined presentation model and runs the ProcessDrillDown method:

this.AddMethod("ProcessDrillDown", function(){
}, {override : true});

Other Examples

The following examples also use AddMethod:

this.AddMethod("InvokeMethod", function(){console.log("In Invoke Method of PM"), {override: true});
this.AddMethod("InvokeControlMethod", DerivedPresentationalModel.prototype.MyInvokeControlMethod,{sequence : true});

For more information, see "Deriving Presentation Models, Physical Renderers and Plug-in Wrappers".

AddProperty Method

The AddProperty method adds a property to a presentation model. Siebel Open UI can access it through the Get method. It returns one of the following values:

  • True. Added a property successfully.

  • False. Did not add a property successfully.

It uses the following syntax:

this.AddProperty("propertyName", propertyValue);

where:

  • propertyName is a string that identifies a property. A subsequent call to this method with the same propertyName overwrites the previous value.

  • propertyValue assigns a value to the property.

For example, the following code adds the NumOfRows property and assigns a value of 10 to this property:

this.AddProperty("NumOfRows", 10);
SiebelJS.Log(this.Get("NumOfRows"));

AddValidator Method

The AddValidator method validates an event. It allows you to write a custom validation for any event. It returns one of the following values:

  • true. Validated the event successfully.

  • false. Did not validate the event successfully.

It uses the following syntax:

Addvalidator(siebConsts.get("event_name"), function(){custom validation}

where:

  • event_name identifies the name of the event that AddValidator validates.

For example, the following code validates the control focus event:

this.AddValidator(siebConsts.get("PHYEVENT_COLUMN_FOCUS"), function(row, ctrl, val){
if(ctrl.GetDisplayName() === "Account" && val === "Hibbing Mfg"){
return true;
});

You can configure Siebel Open UI to use the value that AddValidator returns to determine whether or not to stop running handlers for an event. For more information, see "AttachEventHandler Method".

For more information about events, see "Siebel CRM Events That You Can Use to Customize Siebel Open UI".

AttachEventHandler Method

The AttachEventHandler method attaches an event handler to an event. It uses the following values:

  • consts.get( "SWE_EXTN_CANCEL_ORIG_OP" ). If SWE_EXTN_CANCEL_ORIG_OP returns a value of true, then Siebel Open UI cancels the operation for the predefined event handler. For an example that sets the value for SWE_EXTN_CANCEL_ORIG_OP, see "Attaching and Validating Event Handlers in Any Sequence".

  • consts.get( "SWE_EXTN_STOP_PROP_OP" ). If SWE_EXTN_STOP_PROP_OP returns a value of true, then Siebel Open UI stops the operation for the custom event handler from propagating the customization.

The AttachEventHandler method uses the following syntax:

AttachEventHandler(event_name, function_reference);

where:

  • event_name identifies the name of an event.

  • function_reference identifies the name of a method that the AddMethod method adds. For example, PHYEVENT_CONTROL_BLUR. Siebel Open UI calls OnControlEvent to trigger this event, and then calls the function reference in the scope of the corresponding presentation model.

For more information about:

AttachNotificationHandler Method

The AttachNotificationHandler attaches a method that handles the notification that Siebel Open UI calls when the Siebel Server sends a notification to an applet. It does this attachment when the notification occurs. It returns one of the following values:

  • True. Attached notification handler successfully.

  • False. Did not attach notification handler successfully.

It uses the following syntax:

this.AttachNotificationHandler("notification_name",handler);

where:

  • notification_name is a string that includes the name or type of a notification. For example, NotifyDeleteRecord or SWE_PROP_BC_NOTI_DELETE_RECORD.

  • handler identifies a notification handler that Siebel Open UI calls when notification processing finishes. For example, HandleDeleteNotification.

For more information about:

Example of Using AttachEventHandler

Assume a presentation model named pmodel.js includes an OnControlEvent method that runs a custom event handler, and that Siebel Open UI sends an eventConfig object as the last argument in the event handler call. It uses this eventConfig object in the custom presentation model to set a value for SWE_EXTN_CANCEL_ORIG_OP or SWE_EXTN_STOP_PROP_OP. This configuration allows AttachEventHandler to create multiple custom events and to stop an event handler from running.

For example, assume your customization configures Siebel Open UI to do the following:

  • Derive derivedpm1.js from pmodel.js.

  • Derive derivedpm2.js from derivedpm1.js.

  • Derive derivedpm3.js from derivedpm2.js.

  • Include an event handler for PHYEVENT_COLUMN_FOCUS in derivedpm1.js, derivedpm2.js, and derivedpm3.js.

  • Use derivedpm3.js to set the AttachEventHandler to the value that SWE_EXTN_STOP_PROP_OP contains.

  • Use the following code so that Siebel Open UI uses the last argument that AttachEventHandler specifies:

    this.AttachEventHandler( siebConsts.get("PHYEVENT_COLUMN_FOCUS"), function()
      {
        SiebelJS.Log("Control focus 1");
        arguments[arguments.length - 1][consts.get("SWE_EXTN_STOP_PROP_OP")] = false;
      });
    

Siebel Open UI runs AttachEventHandler customizations in a LIFO (last in, first out) sequence. In this example, it uses the following sequence:

  1. Runs event handlers that reside in derivedpm3.js.

  2. Runs event handlers that reside in derivedpm2.js.

  3. Runs event handlers that reside in derivedpm1.js.

  4. Runs event handlers that reside in the predefined presentation model.

So, this example stops the custom PHYEVENT_COLUMN_FOCUS event handlers in the derivedpm2.js file and the derivedpm1.js file from running.

How Siebel Open UI Uses AttachEventHandler To Manage an Event

An event occurs when the user clicks an object or changes the focus. To manage this event, Siebel Open UI does the following work:

  1. Instructs the physical renderer to call the OnControlEvent method. To make this call, it uses the event name that Siebel Open UI sends to the AttachEventHandler method and corresponding parameters.

  2. Identifies the list of event handlers that it registered with the event name in the Init function of the presentation model.

  3. Uses the OnControlEvent parameters from Step 1 to call each of the event handlers that it identified in Step 2.

  4. Finishes running all the event handlers, and then sends a return value to the object that called OnControlEvent.

AttachPMBinding Method

The AttachPMBinding method binds a method to an existing method. Siebel Open UI calls the method that it binds when it finishes processing this existing method. The AttachPMBinding method returns one of the following values:

  • True. The bind succeeded.

  • False. The bind failed.

It uses the following syntax:

this.AttachPMBinding("method_name",function(){SiebelJS.Log("method_to_call");},{when : function(conditional_function){return value;}});

where:

  • method_name is a string that identifies the name of a method.

  • method_to_call identifies the method that Siebel Open UI calls when it finishes processing method_name.

  • conditional_function identifies a function that returns one of the following values:

    • true. Calls the AttachPMBinding method.

    • false. Does not call the AttachPMBinding method.

For an example that uses AttachPMBinding, see "Customizing the Physical Renderer to Refresh the Carousel".

For more information about using the AttachPMBinding method, see "Configuring Siebel Open UI to Bind Methods" and "Life Cycle Flows of User Interface Elements".

AttachPostProxyExecuteBinding Method

The AttachPostProxyExecuteBinding method binds a method that resides in a proxy or presentation model to a PostExecute method. Siebel Open UI finishes the PostExecute method, and then calls the method that AttachPostProxyExecuteBinding identifies. It uses the following syntax:

this.AttachPostProxyExecuteBinding("method_to_call", function(methodName, inputPS, outputPS){"binder_configuration";return;});

where:

  • method_to_call is a string that identifies the method that Siebel Open UI calls.

  • binder_configuration is a string that identifies code that Siebel Open UI runs after the applet proxy sends a reply.

For more information, see "Refreshing Custom Events" and "PostExecute Method".

In the following example, the user clicks the New button in an applet, Siebel Open UI runs the NewRecord method, and then the client receives the reply from the Siebel Server. In this situation, you can use the following code to run some logic in the presentation model after Siebel Open UI runs the PostExecute method as part of the element life cycle:

this.AttachPostProxyExecuteBinding("NewRecord", function(methodName, inputPS, outputPS){"Do Something for New Record";return;});

The following code runs this same logic in the presentation model for all methods:

this.AttachPostProxyExecuteBinding("ALL", function(methodName, inputPS, outputPS){"Do Something for all methods";return;});

For more information, see "NewRecord Method".

For more examples that use AttachPreProxyExecuteBinding and AttachPostProxyExecuteBinding, see "Customizing the Presentation Model to Call the Siebel Server and Delete a Record" and "Calling Methods".

Using the AttachPreProxyExecuteBinding and AttachPostProxyExecuteBinding Methods

The AttachPreProxyExecuteBinding and AttachPostProxyExecuteBinding methods provide a generic way to do more processing than the AttachNotificationHandler method provides before or after the proxy finishes processing the reply from a method that the client or the Siebel Server calls. A method might cause Siebel Open UI to create a notification from the Siebel Server that does more post-processing than the client proxy requires. This situation can occur with a custom method that you implement on the Siebel Server. For example, with an applet, business service, or some other object type. For more information, see "AttachNotificationHandler Method".

Siebel Open UI sends a notification only for a typical modification that occurs in the predefined product. For example, a new or deleted record or a modified record set. Siebel Open UI might not be able to identify and process the correct notification. For example, you can configure Siebel Open UI to make one call to the WriteRecord method from the client, but the server business logic might cause this method to run more than one time. Siebel Open UI might receive notifications for any WriteRecord method that occurs for a business component that it binds to the current user interface. These notifications might contain more information than the reply notification requires. For more information, see "WriteRecord Method".

AttachPreProxyExecuteBinding Method

The AttachPreProxyExecuteBinding method binds a method that resides in a proxy or presentation model to a PostExecute method. Siebel Open UI calls this method, and then runs PostExecute. The AttachPreProxyExecuteBinding uses the same syntax and arguments that the AttachPostProxyExecuteBinding method uses, except you configure Siebel Open UI to call the AttachPreProxyExecuteBinding method. For more information, see "AttachPostProxyExecuteBinding Method".

ExecuteMethod Method

The ExecuteMethod method runs a method. You can use it to run a predefined or custom method that the presentation model contains. It makes sure Siebel Open UI runs all dependency chains for the method that it calls. For more information about dependency chains, see "About Dependency Injection".

If the method that ExecuteMethod specifies:

  • Exists. It returns a value from the method that it specifies.

  • Does not exist. It returns the following string:

    undefined
    

It uses the following syntax:

this.GetPM().ExecuteMethod("method_name", arguments);

where:

  • method_name is a string that identifies the name of the method that ExecuteMethod runs. You must use the AddMethod method to add the method that method_name specifies before you run ExecuteMethod. If the method that method_name specifies:

    • Exists. Siebel Open UI calls the method that method_name specifies, sends the arguments, gets the return value, and then sends this return value to the object that called the ExecuteMethod method.

    • Does not exist. The ExecuteMethod method does nothing.

  • arguments includes a list of one or more arguments where a comma separates each argument. ExecuteMethod sends these arguments to the method that method_name specifies. It sends these arguments in the same order that you list them in this argument list.

For examples that use InvokeMethod, see "Customizing the Presentation Model to Delete Records" and "Customizing the Presentation Model to Handle Notifications".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

Get Method

The Get method returns the value of the property that Siebel Open UI adds through the AddProperty method. If Siebel Open UI sends a method in the propertyValue argument of the AddProperty method, then it calls the Get method, and then sends the return value to the method that calls the Get method. For an example that uses the Get method, see "Customizing the Presentation Model to Delete Records". For more information about using this method, see "Life Cycle Flows of User Interface Elements".

GetCtrlTemplate Method

The GetCtrlTemplate method gets the template for a control, and then uses values from this template to create an object. It uses values from this template to set the default values and the format for the property set that this control uses. It returns nothing. It uses the following syntax:

GetCtrlTemplate ("control_name", "display_name", consts.get( "control_type" ), column_index);

where:

  • control_name specifies the name of the control.

  • display_name specifies the label that Siebel Open UI displays in the client for this control.

  • control_type specifies the type of SWE control, such as SWE_CTRL_TEXTAREA. You can specify one of the following values:

    • SWE_CTRL_URL

    • SWE_CTRL_TEXTAREA

    • SWE_CTRL_TEXT

    • SWE_CTRL_DATE_TZ_PICK

    • SWE_CTRL_DATE_TIME_PICK

    • SWE_CTRL_DATE_PICK

    • SWE_CTRL_CHECKBOX

    • SWE_CTRL_CALC

    • SWE_CTRL_COMBOBOX

    • SWE_CTRL_PWD

  • column_index is an integer that specifies the physical location in the list control.

For example, the following code gets the template for the TestEdit control:

GetCtrlTemplate ("TestEdit", "Test Edit", consts.get( "SWE_CTRL_TEXTAREA" ), 1);

Init Method

The Init method allows you to use different methods to customize a presentation model, such as AddMethod, AddNotificationHandler, AttachPMBinding, and so on. It uses the following syntax:

Init()

For an example that uses Init, see Step 2.

You must not configure Siebel Open UI to override any method that resides in a derived presentation model except for the Init method or the Setup method. For more information, see "Deriving Presentation Models, Physical Renderers and Plug-in Wrappers".

You must configure Siebel Open UI to do the following:

  • Call the Init method in the predefined presentation model before it calls the Init method in the derived presentation model.

  • Call the Setup method in the predefined presentation model before it calls the Setup method in the derived presentation model. For more information, see "Setup Method for Presentation Models".

For more information about deriving values, see "About Using This Book".

OnControlEvent Method

The OnControlEvent method calls an event. It uses the following syntax:

OnControlEvent(event_name, event_arguments)

where:

  • event_name identifies the name of an event. You must use event_name to send an event.

For more information about:

SetProperty Method

The SetProperty method sets the value of a presentation model property. It returns one of the following values:

  • True. Set the property value successfully.

  • False. Did not set the property value successfully.

It uses the following syntax:

SetProperty(property_name, property_value)

where:

  • property_name specifies the name of the property that SetProperty sets.

  • property_value specifies the value that SetProperty sets for property_name.

If the property that the SetProperty method references does not exist, then Siebel Open UI creates this property and sets the value for it according to the SetProperty method. You can also use the AddProperty method to add a property.

For examples that use SetProperty, see the following topics:

Setup Method for Presentation Models

The Setup method extracts the values that a property set contains. Siebel Open UI calls this Setup method when it processes the initial reply from the Siebel Server. It uses the following syntax:

Setup(property_set)

where:

  • property_set identifies the property set that Siebel Open UI uses with the corresponding proxy object. It contains the property set information for the proxy and any custom property set information that Siebel Open UI added through the presentation model that resides on the Siebel Server. If Siebel Open UI must parse a custom property set, then this work must occur in the Setup method for the derived presentation model. For more information, see "Deriving Presentation Models, Physical Renderers and Plug-in Wrappers".

For example, the following code identifies the childPropset property set:

extObject.Setup(childPropset.GetChild(0));

For more information about:

Presentation Model Class for Applets

This topic describes the methods that Siebel Open UI uses with the presentation models that it uses to display applets. It includes the following information:

Siebel Open UI uses the PresentationModel class to define the presentation models that it uses to display applets. For more information about this class, see "Presentation Model Class".

Summary of Methods That You Can Use with the Presentation Model for Applets

Table A-1 lists the methods that you can use with the presentation model that Siebel Open UI uses for a predefined applet. You cannot configure Siebel Open UI to customize or override any of these methods except for the PostExecute method. You can configure Siebel Open UI to customize the PostExecute method.

Table A-1 Summary of Methods That You Can Use with the Presentation Model for Applets

Method Callable Bindable

CanInvokeMethod

Yes

No

CanNavigate

Yes

No

CanUpdate

Yes

No

ExecuteMethod

Yes

No

ExecuteUIUpdate

No

Yes

FieldChange

No

Yes

FocusFirstControl

No

Yes

GetControl

Yes

No

GetControlId

Yes

No

GetFieldValue

Yes

No

GetFormattedFieldValue

Yes

No

GetPhysicalControlValue

No

Yes

InvokeMethod

Yes

No

InvokeStateChange

No

Yes

IsPrivateField

Yes

No

LeaveField

Yes

No

NewFileAttachment

No

Yes

PostExecute

No

Yes

ProcessCancelQueryPopup

No

Yes

RefreshData

No

Yes

ResetAppletState

No

Yes

SetActiveControl

Yes

Yes

SetFocusDefaultControl

Yes

No

SetFocusToCtrl

No

Yes

SetHighlightState

No

Yes

SetUpdateConditionals

Yes

No

ShowPickPopup

Yes

No

ShowPopup

No

Yes

ShowSelection

No

Yes

UpdateAppletMessage

No

Yes

UpdateConditionals

No

Yes

UpdateCurrencyCalcInfo

No

Yes

UpdateQuickPickInfo

No

Yes

UpdateStateChange

No

Yes


Properties of the Presentation Model That Siebel Open UI Uses for Applets

Table A-2 lists the properties of the presentation model that Siebel Open UI uses for applets.

Table A-2 Properties of the Presentation Model That Siebel Open UI Uses for Applets

Property Description

GetActiveControl

Returns a string that identifies the active control of the applet for the presentation model.

GetAppleLabel

Returns a string that includes the applet label.

GetAppletSummary

Returns a string that includes the applet summary.

GetControls

Returns an array that lists control objects that the applet includes for the presentation model.

GetDefaultFocusOnNew

Returns a string that identifies the control name where Siebel Open UI must set the default focus when the user creates a new record in an applet.

GetDefaultFocusOnQuery

Returns a string that identifies the control name where Siebel Open UI must set the default focus when the user runs a query in the applet.

GetFullId

Returns a string that includes the Applet Full Id that the Siebel Server sends for the presentation model.

GetId

Returns a string that includes the applet ID that the Siebel Server sends for the presentation model. For an example usage of this property, see "Customizing the Physical Renderer to Render the Carousel".

GetMode

Returns a string that identifies the applet mode.

GetName

Returns a string that includes the name of the presentation model.

GetPrsrvControl

Returns a string that identifies the control object of a preserve control that Siebel Open UI sets in a leave field.

GetQueryModePrompt

Returns a string that identifies the prompt that the applet uses when Siebel Open UI uses it in query mode.

GetRecordset

Returns an array that lists the record set that the applet currently displays.

GetSelection

Returns the number of records the user chooses in the applet.

GetTitle

Returns a string that includes the applet title that the presentation model defines.

GetUIEventMap

Returns an array that lists user interface events that are pending. Each element in this array identifies an event that you can access using the following code:

this.Get("GetUIEventMap") [ index ].ev

You can use the following code to access the arguments:

as this.Get("GetUIEventMap") [ index ].ar

IsInQueryMode

Returns a Boolean value that indicates if the applet is in query mode.

IsPure

Returns a Boolean value that indicates if the applet has Buscomp.


Adding Code to the Physical Renderer

You add code for some methods to the section of code in the physical renderer that binds the control to the presentation model. For example, if you must customize code for a currency calculator control, then you modify the code in the physical renderer that binds the currency calculator control to the presentation model. This appendix indicates the methods that must use this configuration.

CanInvokeMethod Method for Presentation Models

The CanInvokeMethod method that Siebel Open UI uses for presentation models determines whether or not Siebel Open UI can invoke a method. It returns one of the following values:

  • true. Siebel Open UI can invoke the method.

  • false. Siebel Open UI cannot invoke the method.

It uses the following syntax:

CanInvokeMethod(method_name)

where:

  • method_name is a string that contains the name of the method that CanInvokeMethod examines. You must enclose this string in double quotation marks, or use a literal value of methodName.

For example, you can add the following code in a physical renderer to determine whether or not Siebel Open UI can call the method that method_name specifies, and if it can call this method on the control that control specifies:

var controlSet = this.GetPM().Get("GetControls");
for(var control in controlSet){
 if(controlSet.hasOwnProperty(control)){
 var caninvoke = this.GetPM().ExecuteMethod("CanInvokeMethod", controlSet[
 control ].GetMethodName());
 }
}

To avoid an error on the Siebel Server, it is recommended that you configure Siebel Open UI to use CanInvokeMethod immediately before it uses InvokeMethod to make sure it can call the method.

For information about the CanInvokeMethod method that Siebel Open UI uses for application models, see "CanInvokeMethod Method for Application Models".

For more examples that use CanInvokeMethod, see the following topics:

CanNavigate Method

The CanNavigate method determines whether or not the user can navigate a control. It returns one of the following values:

  • true. The user can navigate the control.

  • false. The user cannot navigate the control.

It uses the following syntax:

CanNavigate(activeControl.GetFieldName())

For example, the following code uses the CanNavigate method to set up a variable named canNavigate:

var controlSet = this.GetPM().Get("GetControls");
for(var control in controlSet){
  if(controlSet.hasOwnProperty(control)){
   var canNavigate = this.GetPM().ExecuteMethod("CanNavigate", controlSet[
   control ].GetName());
  }
}

The following example identifies the controls in a set of controls that reside in an applet proxy. You can then use the value that CanNavigate returns to determine whether or not Siebel Open UI can render a control as a link:

var controlSet = this.GetPM().Get("GetControls");
for(var control in controlSet){
  if(controlSet.hasOwnProperty(control)){
   var canNavigate = this.GetPM().ExecuteMethod("CanNavigate", controlSet[
   control ].GetName());
  }
}

CanUpdate Method

The CanUpdate method determines whether or not Siebel Open UI can update a control. It returns one of the following values:

  • true. The user can update the control.

  • false. The user cannot update the control.

It uses the following syntax:

CanUpdate(control_name)

where:

  • control_name identifies the name of the control that CanUpdate examines.

The following example identifies the controls that exist in a set of controls that reside in an applet proxy. You can then use the value that CanUpdate returns to write custom code in the physical renderer that modifies a control that Siebel Open UI can update:

var controlSet = this.GetPM().Get("GetControls");
for(var control in controlSet){
  if(controlSet.hasOwnProperty(control)){
   var canupdate = this.GetPM().ExecuteMethod("CanUpdate", controlSet[ control    ].GetName());
  }
}

For an example that uses the CanUpdate method, see "UpdateRecord Method".

ExecuteMethod Method

The ExecuteMethod method runs a method that is available in the presentation model. It returns nothing. It uses the following syntax:

ExecuteMethod("method_name",arguments);

where:

  • method_name is a string that identifies the name of the method that ExecuteMethod runs.

  • arguments lists the arguments that Siebel Open UI requires to run the method that method_name identifies.

For examples that use ExecuteMethod, see the following topics:

For information about how Siebel Open UI uses the ExecuteMethod method, see "How Siebel Open UI Uses the Init Method of the Presentation Model".

ExecuteUIUpdate Method

The ExecuteUIUpdate method updates objects in the user interface. It uses the following syntax:

ExecuteUIUpdate()

For example, the following code in the applicationcontext.js file updates objects that reside in the current applet:

applet.ExecuteUIUpdate();

You can configure Siebel Open UI to call the ExecuteUIUpdate method in the following ways:

  • In the physical renderer:

    this.GetPM().AttachPMBinding("ExecuteUIUpdate", function(){
      custom_code
     });
    
  • In the presentation model:

    this.AddMethod("ExecuteUIUpdate", function(){
    custom_code
     }, {sequence: true, scope: this});
    

For information about where you add this code, see "Adding Code to the Physical Renderer".

FieldChange Method for Presentation Models

The FieldChange method that Siebel Open UI uses with presentation models modifies the value of a field. It returns nothing. It uses the following syntax:

FieldChange(control, field_value)

where:

  • control identifies the name of a control.

  • field_value is a modified value of the control.

For example, you can add the following code to the physical renderer:

this.GetPM().AttachPMBinding("FieldChange", function(control,field_value ){
    custom_code
});

where:

  • custom_code is code that you write that sets the value for the control.

For more information about:

FocusFirstControl Method

The FocusFirstControl method sets the focus on the first control that the presentation model displays. It uses the following syntax:

FocusFirstControl()

You can add the following code to the physical renderer:

this.GetPM().AttachPMBinding("FocusFirstControl", function(){
   custom_code;
});

where:

  • custom_code is code that you write that handles focus updates from the Siebel Server. For example, updating the enable or disable state of a user interface control that the UpdateUIButtons method of the physical renderer specifies. For more information about the UpdateUIButtons method, see "Life Cycle Flows of User Interface Elements".

For information about where you add this code, see "Adding Code to the Physical Renderer".

GetControl Method

The GetControl method returns a control instance. It uses the following syntax:

GetControl(control_name)

where:

  • control_name identifies the name of the control that GetControl gets.

You add this code to the physical renderer.

For examples that use GetControl, see the following topics:

GetControlId Method

The GetControlId method gets the control ID of a toggle applet. It uses the following syntax:

GetControlId()

For example, the following code gets the control ID of the toggle applet that Siebel Open UI currently displays in the client. This code resides in the applet.js file:

return this.GetToggleApplet().GetControlId();

You can add the following code to the physical renderer:

var ToggleEl = this.GetPM().ExecuteMethod("GetControlId");

For information about where you add this code, see "Adding Code to the Physical Renderer".

GetFieldValue Method

The GetFieldValue method returns the value of a field. It uses the following syntax:

this.GetFieldValue(field_ame);

where:

  • field_name identifies the name of a field.

For example, the following code gets the current value of the Call Status field:

pBusComp.GetFieldValue("Call Status");

For another example that uses the GetFieldValue method, see "Text Copy of Code That Does a Partial Refresh for the Presentation Model".

GetFormattedFieldValue Method

The GetFormattedFieldValue method gets the format that a field uses to store the value of a control. It uses the following syntax:

value = this.GetPM().ExecuteMethod("GetFormattedFieldValue", control_name, flag,index);

where:

  • control_name identifies the name of the control.

  • flag is one of the following values:

    • true. Get the formatted field value from the work set.

    • false. Do not get the formatted field value from the work set.

  • index is an index of the record set.

For an example that uses the GetFormattedFieldValue method, see "Overriding Predefined Methods in Presentation Models".

You add the GetFormattedFieldValue method to the physical renderer.

Siebel Open UI gets the format according to the locale object. For example, 1000 is an unformatted value, and 1,000 is a formatted value.

GetPhysicalControlValue Method

The GetPhysicalControlValue method gets the value of a physical control. It uses the following syntax:

GetPhysicalControlValue (control);

For example, the following code gets the value of the physical control that control identifies. This code resides in the pmodel.js file:

this.GetRenderer().GetPhysicalControlValue(control);

The following example binds the physical renderer to the presentation model. You add this code to the physical renderer:

this.AttachPMBinding("GetPhysicalControlValue", function(control){
    custom_code
});

where:

  • control identifies the control value that Siebel Open UI must get from the physical counterpart of this control from the presentation model.

  • custom_code is code that you write that gets the value from the physical control.

InvokeMethod Method for Presentation Models

The InvokeMethod method that Siebel Open UI uses for presentation models calls a method on the applet proxy. It is similar to the InvokeMethod method that Siebel Open UI uses for application models. For more information, see "InvokeMethod Method for Application Models".

InvokeStateChange Method

The InvokeStateChange method invokes a state change. It allows you to configure Siebel Open UI to handle updates. Siebel Open UI calls it when it sends a can invoke notification update from the Siebel Server. The InvokeStateChange method uses the following syntax:

InvokeStateChange()

You can add the following code to the physical renderer:

this.GetPM().AttachPMBinding("InvokeStateChange", function(){
   custom_code;
});

where:

  • custom_code is code that you write that handles updates from the Siebel Server. For example, updating the focus state of a user interface control that the UpdateUIButtons method of the physical renderer specifies. For more information about the UpdateUIButtons method, see "Life Cycle Flows of User Interface Elements".

For information about where you add this code, see "Adding Code to the Physical Renderer".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

IsPrivateField Method

The IsPrivateField method determines whether or not a field is private. A private field is a type of field that only allows the record owner to view the record. For more information about private fields, see Siebel Object Types Reference.

The IsPrivateField method returns one of the following values:

  • true. The field that the control references is private.

  • false. The field that the control references is not private.

It uses the following syntax:

this.IsPrivateField(control.GetName())

You add the following code in the physical renderer:

var bPvtField = this.GetPM().ExecuteMethod("IsPrivateField", control.GetName());

LeaveField Method

The LeaveField method determines whether or not Siebel Open UI has removed the focus from a field in an applet. It returns one of the following values:

  • true. Siebel Open UI has removed the focus from a field. This situation typically occurs when the user navigates away from the field. To do this navigation, the user clicks another object in the applet or navigates away from the applet.

  • false. Siebel Open UI has not removed the focus from a field.

It uses the following syntax:

LeaveField(control,value,do_not_leave);

where:

  • control identifies the control that LeaveField examines.

  • value contains the value that Siebel Open UI sets in the proxy for the control.

  • do_not_leave is set to one of the following values:

    • true. Keep the focus on the control.

    • false. Do not keep the focus on the control.

For examples that use the LeaveField method, see "Customizing the Presentation Model to Identify the Records to Delete" and "Customizing Methods in the Presentation Model to Store Field Values".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

NewFileAttachment Method

The NewFileAttachment method returns the properties of a file attachment. It uses the following syntax:

var attdata = this.GetPM().ExecuteMethod ("NewFileAttachment");

It includes no arguments.

PostExecute Method

The PostExecute method runs in the presentation model after the InvokeMethod method finishes running. Siebel Open UI calls the InvokeMethod method, returns the call from the Siebel Server, and then runs PostExecute. The PostExecute method uses the following syntax:

PostExecute(cmd, inputPS, menuPS, lpcsa);

You add this code in the presentation model:

this.AddMethod("PostExecute", function(method_name, input_property_set,
output_property_set){
  {custom_code},
  {sequence : true, scope : this});

where:

  • method_name identifies the method that the Siebel Server called from the applet proxy.

  • input_property_set contains the property set that Siebel Open UI sends to the Siebel Server from the applet proxy.

  • output_property_set contains the property set that Siebel Open UI sends from the Siebel Server to the applet proxy.

  • custom_code is code that you write that customizes a PostExecute method.

For an example that uses the PostExecute method, see "Registering Methods to Make Sure Siebel Open UI Runs Them in the Correct Sequence".

For more information about using this method, see "AttachPostProxyExecuteBinding Method" and "Life Cycle Flows of User Interface Elements".

ProcessCancelQueryPopup Method

The ProcessCancelQueryPopup method cancels a query dialog box if the user clicks Cancel in this dialog box. It uses the following syntax:

ProcessCancelQueryPopup()

You can add the following code to the physical renderer:

this.GetPM().AttachPMBinding ("ProcessCancelQueryPopup", function(){custom_code}, {scope : this});

where:

  • custom_code is code that you write that cancels the query dialog box.

For information about where you add this code, see "Adding Code to the Physical Renderer".

RefreshData Method

The RefreshData method is proxy method that Siebel Open UI calls when it refreshes an applet in the client according to data that the applet proxy contains. It returns nothing. It uses the following syntax:

RefreshData(value)

where:

  • value contains one of the following values:

    • true. Refresh the applet.

    • false. Do not refresh the applet.

For example, the following code refreshes the current applet. It resides in the applet.js file:

this.RefreshData(true);

You can add the following code to the physical renderer:

this.GetPM().AttachPMBinding("RefreshData", function(value){
custom_code});

where:

  • value contains one of the following values:

    • true. Refresh the applet.

    • false. Do not refresh the applet.

  • custom_code is code that you write that refreshes data in the client user interface.

For information about where you add this code, see "Adding Code to the Physical Renderer".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

ResetAppletState Method

The ResetAppletState method sets the applet to an active state if this applet is not active. It uses the following syntax:

oldActiveApplet.ResetAppletState();

It includes no arguments.

To use the ResetAppletState method, you bind the physical renderer to the presentation model. The following example binds the physical renderer to the presentation model. You add this code to the physical renderer:

this.GetPM().AttachPMBinding("ResetAppletState", function(){
//Code that resets the applet
}
});

SetActiveControl Method

The SetActiveControl method sets the active property of a control in an applet. It returns nothing. It uses the following syntax:

this.ExecuteMethod("SetActiveControl", control_name);

where:

  • control_name identifies the name of a control.

The following code in the presentation model sets the active control to null so that the applet contains no active control:

this.ExecuteMethod("SetActiveControl", null);

For examples that use the SetActiveControl method, see the following topics:

The predefined Siebel Open UI code handles an active control for the applet, so it is recommended that you do not configure Siebel Open UI to directly call the SetActiveControl method. You can use SetActiveControl only in the context of another call that Siebel Open UI makes to an applet control.

SetHighlightState Method

The SetHighlightState method sets the highlight for the active applet. It uses the following syntax:

SetHighlightState(isActive, newActiveApplet)

For example:

this.SetHighlightState(isActive);

You can add the following code to the physical renderer:

this.AttachPMBinding("SetHighlightState", function(isActive, newActiveApplet){
custom_code
});

where:

  • custom_code is code that you write that sets the highlight.

For information about where you add this code, see "Adding Code to the Physical Renderer".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

SetFocusDefaultControl Method

The SetFocusDefaultControl method sets the default focus flag.

SetUpdateConditionals Method

Siebel Open UI calls the SetUpdateConditionals method when the Siebel Server sends change selection information or Can Invoke method notifications to the client. It uses the following syntax:

this.SetUpdateConditionals(condition);

where:

  • condition is true or false.

For example, the following code resides in the applet.js file:

this.SetUpdateConditionals(true);

You can add the following code in the physical renderer to the end of the UpdateConditionals method. This placement makes sure Siebel Open UI runs UpdateConditionals before it runs SetUpdateConditionals:

this.GetPM().ExecuteMethod("SetUpdateConditionals", false);

For more information, see "Notifications That Siebel Open UI Supports".

ShowPickPopup Method

The ShowPickPopup method displays the currency pick applet when the user clicks a pick icon in a currency calculator control. It uses the following syntax:

ShowPickPopup();

For example, the applet.js file includes the following code:

return this.GetCurrencyApplet().ShowPickPopup(this);

You can use the following code:

this.GetPM().ExecuteMethod("ShowPickPopup");

ShowPopup Method

The ShowPopup method displays a dialog box for a calculator control, date control, or date-time control. It uses the following syntax:

ShowPopup()

For example, the applet.js file includes the following code:

this.ShowPopup(control);

You can add the following code to the physical renderer:

this.GetPM().AttachPMBinding ("ShowPopup", function(control){predefined_code;
},{scope : this});

where:

  • predefined_code is code that exists in the physical renderer that you reuse to display the dialog box

ShowSelection Method

The ShowSelection method makes a record the active record. It does not return any values. It uses the following syntax:

ShowSelection()

It includes no arguments.

For example, the pmodel.js file includes the following code:

this.GetApplet(strAppletName).ShowSelection();

It uses the following code to bind the presentation model in the physical renderer:

this.GetPM().AttachPMBinding("ShowSelection", function(){custom_code});

where:

  • custom_code is code that you write. Siebel Open UI runs the ShowSelection method that the applet proxy calls, and then runs your custom code. You add this custom code to the physical renderer.

For examples that use the ShowSelection method, see "Text Copy of Code That Does a Partial Refresh for the Presentation Model" and "Example of Adding a New Method".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

UpdateAppletMessage Method

The UpdateAppletMessage method updates an applet message according to modifications that exist on the Siebel Server. It uses the following syntax:

UpdateAppletMessage()

For example, the applet.js file includes the following code:

this.UpdateAppletMessage();

You add the following code to the physical renderer:

this.GetPM().AttachPMBinding ("UpdateAppletMessage", function(){custom_code}, {scope:this});
//e.g. UpdateAppletMessageUI in phyrenderer.

where:

  • custom_code is code that you write that displays a message.

For information about where you add this code, see "Adding Code to the Physical Renderer".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

UpdateConditionals Method

The UpdateConditionals method runs when Siebel Open UI displays an applet. It uses the following syntax:

UpdateConditionals()

For example, the listapplet.js file contains the following code:

this.UpdateConditionals();

You can add the following code to the code that updates the physical properties and the HTML properties of the control:

this.GetPM().AttachPMBinding ("UpdateConditionals", function(){custom_code},{scope : this});

where:

  • custom_code is code that you write that updates HTML controls. Siebel Open UI runs this code as soon as the proxy calls the UpdateConditionals method.

For information about where you add this code, see "Adding Code to the Physical Renderer".

UpdateCurrencyCalcInfo Method

The UpdateCurrencyCalcInfo method updates information that Siebel Open UI uses for a currency calculation. Siebel Open UI calls it when it sends currency information from the Siebel Server. You can use it to display currency information in an applet. It uses the following syntax:

UpdateCurrencyCalcInfo(0,args)

For example, the applet.js file contains the following code:

this.UpdateCurrencyCalcInfo(0,args);

You can add the following code to the InvokeCurrencyApplet method of the physical renderer:

this.GetPM().AttachPMBinding ("UpdateCurrencyCalcInfo", function(){custom_code}   , {scope : this}});

where:

  • custom_code is code that you write that updates information in the currency calculator control.

For information about where you add this code, see "Adding Code to the Physical Renderer".

UpdateQuickPickInfo Method

The UpdateQuickPickInfo method updates List of Values (LOV) information. Siebel Open UI calls it when it sends LOV information from the Siebel Server to the client. It uses the following syntax:

UpdateQuickPickInfo(field, true, arrValues, 0);

For example:

this.UpdateQuickPickInfo(field, true, arrValues, 0);

You can add the following code to the physical renderer:

this.GetPM().AttachPMBinding ("UpdateQuickPickInfo", function(){custom_code}, {scope:this});

where:

  • custom_code is code that you write that updates information in the LOV.

For information about where you add this code, see "Adding Code to the Physical Renderer".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

UpdateStateChange Method

The UpdateStateChange method handles notification updates. Siebel Open UI calls it when it sends notification updates from the Siebel Server. It uses the following syntax:

UpdateStateChange()

You can add the following code to the physical renderer:

this.GetPM().AttachPMBinding("UpdateStateChange", function(){
   custom_code;
});

where:

  • custom_code is code that you write that handles state change updates from the Siebel Server. For example, updating the enable or disable state of a user interface control that the UpdateUIControls method of the physical renderer specifies.

For information about where you add this code, see "Adding Code to the Physical Renderer".

For more information about using this method, see "Life Cycle Flows of User Interface Elements" and "Notifications That Siebel Open UI Supports".

Presentation Model Class for List Applets

This topic describes the methods that Siebel Open UI uses with the presentation models that it uses to display list applets. It includes the following information:

The presentation model that Siebel Open UI uses for list applets uses the ListPresentationModel class, which is a subclass of the class that Siebel Open UI uses with the presentation models that display applets.

Siebel Open UI defines this presentation model in the listpmodel.js file. For more information about the class that Siebel Open UI uses with the presentation models that display applets, see "Presentation Model Class for Applets."

Properties of the Presentation Model That Siebel Open UI Uses for List Applets

Table A-3 lists the properties of the presentation model that Siebel Open UI uses for a list applet.

Table A-3 Properties of the Presentation Model That Siebel Open UI Uses for List Applets

Property Description

GetBeginRow

Returns the beginning row number of a list applet.

GetListOfColumns

Returns an array, where each item in this array corresponds to a column control in a list applet. Each of these items is defined as a JSON object with the following keys:

  • name

  • controlType

  • isLink

  • index

  • bCanUpdate

  • control

For more information about JSON, see the JSON Web site at http://www.json.org.

GetRowIdentifier

Returns a string that contains information about the row.

GetRowListRowCount

Returns the number of rows that a list applet contains.

GetRowsSelectedArray

Returns an array, where each item in this array corresponds to a row number in a list applet. Each array item includes one of the following values:

  • true. The row is chosen.

  • false. The row is not chosen.

HasHierarchy

Returns a Boolean value that indicates whether or not the list can include hierarchical records.


Summary of Methods That You Can Use with the Presentation Model That Siebel Open UI Uses for List Applets

Table A-4 summarizes the methods that you can use with the presentation model that Siebel Open UI uses for a list applet. You cannot configure Siebel Open UI to customize or override any of these methods.

Table A-4 Summary of Methods That You Can Use with the Presentation Model That Siebel Open UI Uses for List Applets

Method Callable Bindable

CellChange

No

Yes

HandleRowSelect

Yes

Yes

OnClickSort

Yes

No

OnCtrlBlur

Yes

No

OnCtrlFocus

Yes

No

OnDrillDown

Yes

No

OnVerticalScroll

Yes

No

SetMultiSelectMode

No

Yes


CellChange Method

The CellChange method determines whether or not Siebel Open UI modified the value of a control. If Siebel Open UI modified this value, then it returns the new value. It uses the following syntax:

CellChange(rowId, field_name, value);

where:

  • rowId is a number of zero through n, where n is the maximum number of rows that the list applet displays. This number identifies the row that contains the control.

  • field_name identifies the name of the control that Siebel Open UI analyzes to determine whether or not Siebel Open UI modified the value.

  • value is a value that the control contains.

For example, the following code from the listapplet.js file determines whether or not Siebel Open UI modified the value of a control. The GetName method identifies this control. The value argument is a variable that contains the control value:

this.CellChange(rowId, control.GetName(), value);

Siebel Open UI can bind the physical renderer to the CellChange method to determine whether or not it modified the value for the control.

HandleRowSelect Method

The HandleRowSelect method chooses a row. It returns one of the following values:

  • true. Row chosen successfully.

  • false. Row not chosen due to an error in the client or on the Siebel Server.

It uses the following syntax:

HandleRowSelect(rowId, control_key, shift_key);

where:

  • rowId is a number of zero through n, where n is the maximum number of rows that the list applet displays. This number identifies the row that HandleRowSelect chooses.

  • control_key is one of the following values:

    • true. Choose the CTRL key when choosing the row.

    • false. Do not choose the CTRL key when choosing the row.

  • shift_key is one of the following values:

    • true. Choose the SHIFT key when choosing the row.

    • false. Do not choose the SHIFT key when choosing the row.

For an example that uses HandleRowSelect, see "Customizing the Presentation Model to Delete Records".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

OnClickSort Method

The OnClickSort method sorts a column. It uses the following syntax:

OnClickSort(name, direction);

where:

  • name identifies the name of the control that Siebel Open UI sorts.

  • direction is one of the following values:

    • asc. Sort the control in ascending order.

    • desc. Sort the control in descending order.

For example, the following code sorts the my_accounts control in descending order:

bReturn = this.GetProxy().OnClickSort(my_accounts, desc);

For another example, the following code sorts the my_accounts control in ascending order:

this.ExecuteMethod("OnClickSort", my_accounts, asc);

This method is asynchronous, so you cannot configure Siebel Open UI to bind it. For more information, see "About Synchronous and Asynchronous Requests".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

OnCtrlBlur Method

The OnCtrlBlur method blurs a control, where blur is a state that makes the control not the active control. It returns nothing. It uses the following syntax:

OnCtrlBlur(rowId, control, value);

where:

  • rowId is a number of zero through n, where n is the maximum number of rows that the list applet displays. This number identifies the row that contains the control.

  • control identifies the control that Siebel Open UI must blur.

  • value is a variable that contains the value of the control.

For example, the following code blurs the my_accounts control. This control resides in the row that the counter variable identifies. For example, if the counter variable contains a value of 3, then OnCtrlBlur blurs the my_accounts control that resides in row 3. The value argument is a variable that contains the control value. For example, if the value of the my_accounts control is Oracle, then the value variable contains a value of Oracle:

this.ExecuteMethod("OnCtrlBlur", counter, my_accounts, value);

OnCtrlBlur does the localization and notifies the binder method that Siebel Open UI attaches through the CellChange method, when required. If Siebel Open UI configures the control to do ImmediatePostChanges, then OnCtrlBlur also runs these modifications.

You must make sure Siebel Open UI uses the OnCtrlFocus method to make the control active before you use the OnCtrlBlur method. If the control is not active, then Siebel Open UI rejects any OnCtrlBlur call. For more information, see "OnCtrlFocus Method".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

OnCtrlFocus Method

The OnCtrlFocus method brings a control into focus, where focus is a state that makes the control the active control. It uses the following syntax:

OnCtrlFocus(rowId, control, value);

where:

  • rowId, control, and value work the same as with the OnCtrlBlur method.

For example, the following code brings the my_accounts control into focus:

this.ExecuteMethod("OnCtrlFocus", counter, my_accounts, value);

For more information about these arguments and this example, see "OnCtrlBlur Method".

You must make sure no other control is active. If another control is already active, and if you configure Siebel Open UI to run OnCtrlFocus, then Siebel Open UI rejects the OnCtrlFocus call.

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

OnDrillDown Method

The OnDrillDown method drills down on a control. It returns one of the following values:

  • true. Drilldown succeeded.

  • false. Drilldown failed because an error occurred on the client or on the Siebel Server.

It uses the following syntax:

OnDrillDown(control_name, rowId);

where:

  • control_name identifies the name of the control where Siebel Open UI does the drilldown.

  • rowId is a number of zero through n, where n is the maximum number of rows that the list applet displays. This number identifies the row that contains the control where Siebel Open UI does the drilldown.

For example, the following code drills down on the my_accounts control. The counter identifies the row that contains this control. For more information about how another example uses this counter, see "OnCtrlBlur Method":

this.ExecuteMethod("OnDrillDown", my_accounts, counter);

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

OnVerticalScroll Method

The OnVerticalScroll method scrolls a set of records. It returns nothing. It uses the following syntax:

OnVerticalScroll(scroll_action);

where:

  • scroll_action is one of the following values:

    • nxrc. Scroll down to the next record.

    • pvrc. Scroll up to the previous record.

    • pgdn. Page down to the next set of records.

    • pgup. Page up to the prior set of records.

For example, the following code configures Siebel Open UI to scroll to the next record. You add this code to the physical renderer:

this.ExecuteMethod("OnVerticalScroll", "nxrc");

This method is asynchronous, so you cannot configure Siebel Open UI to bind it. For more information, see "About Synchronous and Asynchronous Requests".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

SetMultiSelectMode Method

The SetMultiSelectMode method determines whether or not a list applet is using multiselect mode. It uses the following syntax:

SetMultiSelectMode(bInMultiSelMode)

where:

  • bIsInMultiSelectMode is a variable that includes one of the following values.

    SetMultiSelectMode returns this value:

    • true. List applet is using multiselect mode.

    • false. List applet is not using multiselect mode.

For example, the following code determines whether or not the list applet that the appletIndex identifies is using multiselect mode. This code resides in the notifyobject.js file:

for(var appletIndex=0, len = applets.length; appletIndex < len; appletIndex++){
  applets[appletIndex].SetMultiSelectMode(bInMultiSelMode);

The physical renderer can use the AttachPMBinding method in the presentation model to bind to the SetMultiSelectMode method. The following binding allows the physical renderer to know if the list applet is in multiselect mode:

this.AttachPMBinding("SetMultiSelectMode", InMultiSelectMode, this);
  function InMultiSelectMode(bIsInMultiSelectMode){
  }

Presentation Model Class for Menus

This topic describes the methods that Siebel Open UI uses with the presentation models that it uses to display menus. It includes the following information:

Properties of the Presentation Model for Menus

Table A-5 describes the properties of the presentation model that Siebel Open UI uses for menus.

Table A-5 Properties of the Presentation Model for Menus

Property Description

GetObjectType

Returns a string that describes object information.

GetRepstrName

GetUIName

GetId

Returns a string that describes the identifier of the menu object. Siebel Open UI gets this value from the parent menu of this menu object.

GetLabel

Returns a string that describes the label of the menu object. Siebel Open UI gets this value from the parent menu of this menu object.


GetMenuPS Method

The GetMenuPS method returns a property set that includes information about a menu and the menu items that this menu contains. It uses the following syntax:

GetMenuPS()

It includes no arguments.

For example:

var menuPS = this.ExecuteMethod("GetMenuPS");

The following example includes a typical property set that the GetMenuPS method returns:

childArray
[0]
- childArray
- propArray
- Caption : "Undo Record [Ctrl+U]"
- Command : "*Browser Applet* *UndoRecord*SIS Account List Applet* "
- Enabled : [True|False]
- Type: "Command\|Separator"

OnMenuInvoke Method

The OnMenuInvoke method creates a menu. It returns nothing. It uses the following syntax:

OnMenuInvoke(consts.get("APPLET_NAME")

The applicationcontext.js file includes the following code:

activeAplt.GetMenu().OnMenuInvoke(consts.get("APPLET_NAME")

You can use the following code:

this.ExecuteMethod("OnMenuInvoke", consts.get("APPLET_NAME"), consts.get("SWE_PREPARE_APPLET_MENU"), consts.get("SWE_MENU_APPLET"), true);

ProcessMenuCommand Method

The ProcessMenuCommand method runs when the user chooses a menu item. It returns nothing. It uses the following syntax:

this.ExecuteMethod("ProcessMenuCommand", menuItemCommand);

It includes no arguments.

ShowMenu Method

The ShowMenu method displays a menu. It exists only for binding purposes. It makes sure Siebel Open UI finishes all processing related to the menu property set. It returns nothing. It uses the following syntax:

this.AttachPMBinding("ShowMenu", ShowMenuUI, this};
function ShowMenuUI(){
// Include here code that displays the menu control.
}

It includes no arguments.

Siebel Open UI finishes running the ShowMenu method in the proxy, and then immediately runs the ShowMenuUI method.

You must not configure Siebel Open UI to call the ShowMenu method from an external application.

Physical Renderer Class

This topic describes the methods that Siebel Open UI uses with the PhysicalRenderer class. It includes the following information:

BindData Method

The BindData method downloads metadata and data from the Siebel Server to the client proxy, and then binds this data to the user interface. The list columns that a list applet uses is an example of metadata, and the record set that this list applet uses is an example of data. The BindData method uses the following syntax:

BindData(searchData, options);

For example, the following code in the renderer.js file uses the BindData method:

this.GetSearchCtrl().BindData(searchData, options);

For another example, the following code gets the value for a control from the presentation model, and then binds this value to this control:

CustomPR.prototype.BindData = function(){
 var controlSet = pm.Get("GetControls");
  for(var controlName in controlSet){
   if(controlSet.hasOwnProperty(controlName)){
    var control = controlSet[controlName];
     // Get value for this control from presentation model and bind it to
      //the control.
    }
  }
};

Siebel Open UI expects the physical renderer to use the BindData method to bind data to the physical control. The BindData method also gets the initial value from the presentation model, and then attaches this value to the control.

For information about:

BindEvents Method

The BindEvents method binds an event. It returns nothing. It uses the following syntax:

BindEvents(this.GetProxy().GetControls());

For example, the following code in the renderer.js file uses the BindEvents method:

this.GetConcreteRenderer().BindEvents(this.GetProxy().GetControls());

For another example, the following code binds a resize event:

CustomPR.prototype.BindEvents = function(){
var controlSet = controls||this.GetPM().Get("GetControls");
for(var control in controlSet){
  if(controlSet.hasOwnProperty(control)){
     // Bind for each control as required.
   }
}
// Resize event
$(window).bind("resize.CustomPR", OnResize, this);
};
function OnResize(){
}

Siebel Open UI expects the physical renderer to use the ShowUI method to do all possible event binding. The event can reside on an applet control or in the applet area of the DOM. This binding also applies to any custom event, such as resizing a window. For more information, see "ShowUI Method" and "Siebel CRM Events That You Can Use to Customize Siebel Open UI".

For information about how Siebel Open UI uses BindEvents, see the following topics:

EnableControl Method

The EnableControl method enables a control. It uses the following syntax:

EnableControl(control_name)

where:

  • control_name identifies the name of the control that EnableControl enables.

EndLife Method

The EndLife method ends an event. It returns nothing. It uses the following syntax:

EndLife()

It includes the following arguments:

CustomPR.prototype.EndLife = function(){
$(object).unbind ("event.CustomPR");
};

where:

  • object identifies the object where the event runs.

  • event identifies the name of an event.

It is recommended that you configure Siebel Open UI to end the life of any event that it no longer requires. This configuration makes sure an event handler does not continue to exist even if no object references it. For example, assume you attached a resize event on a window, and then Siebel Open UI finished running this event. The following code ends the resize event on the window object:

CustomPR.prototype.EndLife = function(){
   $(window).unbind ("resize.CustomPR");
};

For information about how Siebel Open UI uses EndLife, see the following topics:

FieldChange Method for Physical Renderers

The FieldChange method that Siebel Open UI uses with physical renderers modifies the value of a field. It returns nothing. It uses the following syntax. You add this code to the constructor method in the physical renderer:

this.GetPM().AttachPMBinding("FieldChange", this.SetControlValue, {scope: this}

It includes no arguments.

For example, you can add the following code to the constructor method that resides in the physical renderer:

this.GetPM().AttachPMBinding("FieldChange", this.SetControlValue, {scope: this}
);

This code adds the following code to the BinderMethod that resides in the physical renderer:

CustomPR.prototype.SetControlValue = function(control, value){
};

Siebel Open UI finishes running the FieldChange method, and then calls the SetControlValue method that sets the value in the physical instance of the control.

For more information, see "AttachPMBinding Method".

For information about the FieldChange method that Siebel Open UI uses with presentation models, including examples that use FieldChange, see "FieldChange Method for Presentation Models".

GetPM Method for Physical Renderers

The GetPM method returns a presentation model instance. It uses the following syntax:

GetPM()

It includes no arguments.

For example, the jqmlistrenderer.js file includes the following code:

var listOfColumns = this.GetPM().Get("ListOfColumns");

For information about:

SetControlValue Method

The SetControlValue method sets the value for the control that Siebel Open UI sends as an argument.

For an example that uses SetControlValue, see "FieldChange Method for Physical Renderers".

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

ShowUI Method

The ShowUI method displays the physical control that corresponds to an applet control. It returns nothing. It uses the following syntax:

ShowUI()

It includes no arguments.

For example:

CustomPR.prototype.ShowUI = function(){
 var controlSet = this.GetPM().Get("GetControls");
 for(var control in controlSet){
  if(controlSet.hasOwnProperty(control)){
   // Display each control, as required.
  }
 }
};

A physical renderer must provide a definition for each of the following methods:

  • ShowUI

  • BindEvents

  • BindData

It can do this definition in each of these methods or in a superclass, which is a parent class of the class that the method references.

For information about:

Plug-in Wrapper Class

This topic describes the methods that Siebel Open UI uses with the basepw, which is the Plug-in Wrapper base class. The methods exposed by basepw are as follows:

GetEl Method

The GetEl method simplifies the process of finding DOM element associated with a particular control in the applet region. It can detect if the control has multiple instances in the DOM and if so, it will them return all. If a single instance is required, the index must be passed to this function. It uses the following syntax:

GetEI(index)
  • Where index is a numerical value representing the row number of the DOM element of the control that is required. This argument is optional.

Returns the associated jQuery based DOM reference for the control or NULL.

For example, the following code uses the GetUI method to retrieve all DOM element of a particular control:

var el =  this.GetUIWrapper( control ).GetEl();

For another example, the following code uses the GetUI method to retrieve index-based DOM elements of a particular control when the control has multiple DOM instances, as in a list applet:

var el = this.GetUIWrapper( control ).GetEl( index );

ShowUI Method

The ShowUI method performs show-related activities for a control. It requires the GetEl method and the Template Manager to accomplish its purpose.

For more information, see "ShowUI Method".

BindEvents Method

The BindEvents method attaches events to the DOM instance of a control. It requires the GetEl method and the Event Helper to accomplish its purpose.

For more information, see "BindEvents Method".

SetValue Method

The SetValue method sets the value in the DOM instance of control. If there are multiple DOM instances for the control, the index argument is used to used to determine the instance to which the value should be set.Customized plug-in wrappers must use this index to find associated DOM instances and call appropriate value modification APIs in the DOM to reflect the customization.

It uses the following syntax:

SetValue(value, index)
  • Where value identifies the value of the control DOM instance.

  • Where index is a numerical value representing the row number of the DOM element of the control that is required.

GetValue Method

The GetValue method gets the value of the control field from the DOM. If multiple instances of the control exist, then the index parameter is used to identify the value of the particular control that is needed. It uses the following syntax:

GetValue(index)
  • Where index is a numerical value representing the row number of the DOM element of the control that is required.

BeginQuery Method

The BeginQuery method indicates to a customized PW that it is entering query mode. It uses the following syntax:

BeginQuery()

It includes no arguments.

EndQuery Method

The EndQuery method indicates to a customized PW that it is exiting query mode. It uses the following syntax:

EndQuery()

It includes no arguments.

GetIconMap Method

The GetIconMap method determines if there are any configured icon maps for a customized PW control. If it does, the appropriate icon map is returned. It uses the following syntax:

GetIconMap()

It includes no arguments.

SetState Method

The SetState method provides an indicator to a customized PW to set a state to the associated DOM instances. If there are multiple DOM instances, use the index argument to retrieve the appropriate element. It uses the following syntax:

SetState(state, flag, index)
  • Where state is one of the following values:

    • EDITABLE. Can be edited.

    • ENABLE. Is enabled.

    • SHOW. Is visible.

    • FOCUS. Is focussed.

  • Where flag indicates if the state should be reversed, and is one of the following values:

    • TRUE. The state should be reversed.

    • FALSE. The state should be maintained.

      For example, if the state is set to EDITABLE, and the flag is set to TRUE, the value of state will be reversed to NON-EDITABLE.

  • Where index is a numerical value representing the row number of the DOM element of the control that is required.

Plugin Builder Class

This topic describes the Plugin Builder class. The Plugin Builder class wires the Plug-in Wrapper to the given Applet Control, specifying the conditions under which the wrapper is to be used. It uses the API AttachPW for this purpose. It uses the following syntax:

SiebelApp.S_App.PluginBuilder.AttachPW(Control Type, PW Class, function (control, objName) {
         return <conditions>;
  • Where Control Type is the SWE constant for the type of control that you are trying to override the functionality for. For a complete listing of control types, see "About Supported Template Manager Controls".

  • Where PW Class is the name of the custom wrapper.

For example, the following code shows how to attach the Plug-In wrapper with a custom combobox wrapper that would deploy for all buttons in the Contact List Applet:

SiebelApp.S_App.PluginBuilder.AttachPW(consts.get("SWE_CTRL_COMBOBOX"), SiebelAppFacade. CustomComboPW,  function (control, objName) {
       return (objName === "Contact List Applet");
});

Another example, the following code shows how to attach the Plug-In wrapper with a custom text box wrapper that would deploy for all text boxes in the Opportunity List Applet or the Sales Order Form Applet:

SiebelApp.S_App.PluginBuilder.AttachPW(consts.get("SWE_CTRL_TEXT"), SiebelAppFacade.CustomTextPW, function  (control, objName) {
return (objName === "Opportunity List Applet" || objName === "Sales Order Form");
});

Another example, the following code shows how to attach the Plug-In wrapper with a custom combobox wrapper that would deploy for all combo boxes of a certain name, across the application:

SiebelApp.S_App.PluginBuilder.AttachPW(consts.get("SWE_CTRL_COMBOBOX"), SiebelAppFacade.CustomComboPW,  function (control, objName) {
return (control.GetName() === "Last Name");
});

Another example, the following code shows how to attach the Plug-In wrapper with a custom text box wrapper that would deploy for only a specific control with a specific name in the Sales Order Form Applet:

SiebelApp.S_App.PluginBuilder.AttachPW(consts.get("SWE_CTRL_TEXT"), SiebelAppFacade.CustomTextPW, function  (control, objName) {
 return (control.GetName() === "Revenue" && objName === "Sales Order Form");
});

Another example, the following code shows how to attach the Plug-In wrapper with a custom checkbox that would deploy for all touch enabled devices:

SiebelApp.S_App.PluginBuilder.AttachPW(consts.get("SWE_CTRL_CHECKBOX"), SiebelAppFacade.CustomCheckPW,  function (control) {
return SiebelAppFacade.DecisionManager.IsTouch();
});

Note:

The global call depicted in this example can be used in conjunction with other conditions, such as the ones in previous examples.

For more information about the Attach PW API and examples of how to use the AttachPW API, see "Configuring the Manifest for the Color Box Example".

Template Manager Class

This topic describes the Template Manager Class. This topic contains the following topics:

About the Template Manager Class

The Template Manager class generates HTML for various controls, and uses the following method and syntax:

GenerateMarkup( configObject );

The GenerateMarkup method uses only one argument, that is an object. Depending on the properties present in object, Template Manager chooses the appropriate flow for the generation of the HTML. The following list describes the different properties that you can specify via configObject:

  • type. Specify the type of control to generate. For a list of types, please see Table A-6. When not specified, the value will default to the input field or SWE_CTRL_TEXT.

  • class. Specify the class name to attach to the control. If multiple classes need to be attached, use a space-separated string. TM will also attaches pre-defined CSS class name for the control, based on the type of control being generated.

  • id. Specify the ID which needs to be given to the control. Depending on the control type provided, auto generated value for ID can be attached by TM to the control if not provided.

  • values. Specify the value that needs to be attached to the control.


    Note:

    When specifying ComboBox for the type, you can specify an array of values. Also, the selected index needs to be specified with the property index.

  • attrs. Specify any other attribute that should be attached to the control, in string format. For example, if you need aria attributes aria-label, aria-labelledby, and aria-describedby to be attached to the control, you would use the following code:

    "aria-label='abc'  aria-labelledby='xyz'  aria-describedby='123'"
    

About Supported Template Manager Controls

This topic describes supported Template Manager controls.

The Template Manager class provides mark-up for the many types of controls required in Siebel Open UI. Table A-6 lists the supported Template Manager controls.

Table A-6 Supported Template Manager Controls

HTML Type in Siebel Open UI Corresponding SWE Constants Additional Information

Button

SWE_PST_BUTTON_CTRL

None.

Text Field

SWE_CTRL_TEXT

None.

span

SWE_CTRL_PLAINTEXT

None.

Check Box

SWE_CTRL_CHECKBOX

None.

Date (HTML5)

SWE_CTRL_DATE_PICK

Falls back to HTML4 input field control.

Date Time (HTML5)

SWE_CTRL_DATE_TIME_PICK

Falls back to HTML4 input field control.

URL (HTML5)

SWE_CTRL_URL

None.

TEL (HTML5)

SWE_CTRL_PHONE

Falls back to HTML4 input field control.

File

SWE_CTRL_FILE

None.

Radio

SWE_CTRL_RADIO

None.

Eff Date

SWE_CTRL_EFFDAT

None.

MVG

SWE_CTRL_MVG

None.

Pick

SWE_CTRL_PICK

None.

Detail

SWE_CTRL_DETAIL

None.

Calc

SWE_CTRL_CALC

None.

Link

SWE_CTRL_LINK

Links with the address in src property.

MailTo

SWE_CTRL_MAILTO

Links with the address supplied in src property.

Img

SWE_CTRL_IMAGECONTROL

Image with the source provided in src property.

Text Area

SWE_CTRL_TEXTAREA

None.

Label

SWE_CTRL_LABEL

None.

ComboBox (Select)

SWE_CTRL_COMBOBOX

Accepts the following additional configuration:

  • displayValue. An array of values that should be displayed in the Option List.

  • value. An array of actual values.

  • index. Zero-based value that indicates currently selected value.


Examples Using Template Manager

This topic describes examples of using Template Manager. The examples in this section assume that tmplMgr is a reference to the Template Manager Object, and consts is a reference to SiebelApp.Constants object.

Example of Generating Markup for a Normal Text Field

In this example, we use the following code make the call to the Template Manager to generate markup for a normal text field:

var markup = tmplMgr.GenerateMarkup({
         type : consts.get( "SWE_CTRL_TEXT" )
      });

In the this example, this is the expected HTML string begin held by the markup variable:

<input type="text" class="siebui-input " />

Example of Generating Markup with an Additional className

In this example, we use the following code make the call to the Template Manager to generate markup for with an additional className:

var markup = tmplMgr.GenerateMarkup({
         type : consts.get( "SWE_CTRL_TEXT" ),
         class: "siebui-align-left"
      });

In the this example, this is the expected HTML string begin held by the markup variable:

<input type="text" class="siebui-input siebui-align-left" />

Example of Generating Markup with Additional Attributes

In this example, we use the following code make the call to the Template Manager to generate markup for with additional attributes:

var markup = tmplMgr.GenerateMarkup({
         type : consts.get( "SWE_CTRL_TEXT" ),
         attrs: "aria-label=\"abc\"  aria-labelledby=\"xyz\"  aria-describedby=\"123"
      });

In the this example, this is the expected HTML string begin held by the markup variable:

<input type="text" class="siebui-input " aria-label="abc" aria-labelledby="xyz" aria-describedby="123 />

Example of Generating a Combo Box with Multiple Options

In this example, we use the following code make the call to the Template Manager to generate a combo box with multiple options, Value 1, Value 2, and Value 3:

var markup = tmplMgr.GenerateMarkup({
         type : consts.get( "SWE_CTRL_COMBOBOX" ),
         value: [ "Value 1", "Value 2", "Value 3" ],
         index: 1 // zero based index
      });

In the this example, this is the expected HTML string begin held by the markup variable:

<select class="siebui-select ">
         <option>Value 1</option>
         <option selected> Value 2</option>
         <option>Value 3</option>
</select>

Example of Generating a Hyperlink

In this example, we use the following code make the call to the Template Manager to generate a hyperlink:

var markup = tmplMgr.GenerateMarkup({
         type : consts.get( "SWE_CTRL_LINK" ),
         src  : "http://www.oracle.com",
         value: "Oracle HomePage"
      });

In the this example, this is the expected HTML string begin held by the markup variable:

<a class="siebui-link" src="http://www.oracle.com>Oracle HomePage</a>

Event Helper Class

The Event Helper Class uses the Event Helper Object to facilitate Event Binding in the Physical Renderer or Plug-in Wrapper.

To retrieve the event helper:

var evtHelper = this.Helper("EventHelper" );

Manage is the singular API exposed by the Event Helper Class for unified event binding for DOM elements across multiple platforms. Use the following API specification as a guideline to use the EventHelper object to bind an event:

evtHelper.Manage( el, eventName, eventData, eventHandler );

Note:

The above syntax is similar to a jQuery bind call. With this call, an attempt is being made to bind event eventName to element el with event data eventData and event handler eventHandler.

Use the following API specification as a guideline to use delegate-on type for event binding:

evtHelper.Manage( el, eventName, eventData, eventHandler, elChild );

For example:

var evtHelper = this.Helper( "EventHelper" );
evtHelper.Manage( el, "down" , functionRef );

The down event is attached to element el, with functionRef defined as the Event Handler. Both touch and mouse events are handled, depending on the environment. The down value will get translated to mousedown in a mouse-enabled environment, and to touchstart in a touch-enabled environment.

About Event Helper Mappings

In Siebel Innovation Pack 2014 and later, inter-platform event mappings done by the Event Helper object have been harmonized. Consequently, similar actions that create different events on different platforms now result in the same behavior across platforms.

Table A-7 shows unified event names and their corresponding actions on touch and non-touch platforms. Using the new unified events creates familiar experiences for users across platforms.

Table A-7 Unified Event Name Translations

Unified Event Name Translation On Non-Touch Platform Translation On Touch Platform

down

mousedown

touchstart

start

mousedown

touchstart

click

click

click

up

mouseup

touchend

end

mouseup

touchend

move

mousemove

touchmove

over

mouseover

none

out

mouseout

none

cancel

mouseout

touchcancel

dnter

mouseenter

none

leave

mouseleave

none

hover

hover

none

focus

focus

focus

blur

blur

blur

keydown

keydown

none

keyup

keyup

none

keypress

keypress

keypress


Furthermore, the same unified bindings translate to pointer-based events if the Siebel Open UI Client application detects that the browser supports the pointer object. This behavior is specific to Internet Explorer browsers and pointer events used by Microsoft to unify event handling across different devices on Internet Explorer 10 and later.

Table A-8 describes the pointer event mapping.

Table A-8 Unified Event Name Translations for Windows 8

Unified Event Name Translation On Windows 8 Internet Explorer Pointer-Based Devices

down

pointerdown

start

pointerdown

click

click

up

pointerup

end

pointerup

move

pointermove

over

pointerover

out

pointerout

cancel

pointercancel

enter

pointerenter

leave

pointerleave

hover

mspointerhover

focus

focus

blur

blur

keydown

keydown

keyup

keyup

keypress

keypress


About Double-Click

A double click event is usually handled natively by the browser, such as the zoom action in touch based devices. Consequently, it is not recommended that you attach custom handlers to the double-click event. Attaching custom handlers might make it impossible to unify the behavior of the double-click action.

About JQuery Mobile-Specific Events

Siebel Open UI no longer supports jQuery Mobile on any device, including touch-based devices. Consequently, you cannot attach jQuery Mobile-specific events to DOM elements. Examples of such events are as follows:

  • pageinit, pageload, pageremove, pageshow

  • scrollstart, scrollstop

  • swipe, swipeleft, swiperight

  • tap, taphold

  • All v* events, also known as virtualized mouse events

jQuery Mobile uses the jQuery library internally to implement the events listed above. It is therefore possible to capture these events using jQuery event handlers. For example, you can use a combination of start (touchstart) and end (touchend) to capture a swipe.

About Events Not Unified by Event Helper

Events not unified by the Event Helper or listed in Table A-7 and Table A-8 can still be used with Manage API to attach custom handlers. This applies to events supported by jQuery natively and to custom events that are generated by custom PR/PW code or by third-party plug-in customizations.

For example, a plug-in like iScroll might trigger events such as scollLeft or scrollStop on the element to which the plug-in is attached. The custom PR code can effectively attach custom handlers to these events using the Manage API.

Business Component Class

Siebel Open UI defines the Business Component class in the component.js file. You can use the Setup method with this class. For more information, see "Setup Method for Presentation Models".

Applet Class

This topic describes the methods that Siebel Open UI uses with the Applet class. It includes the following information:

Siebel Open UI defines this class in the applet.js file.

AddClientControl Method

The AddClientControl method adds a control in the client. It returns nothing. It uses the following syntax:

Applet.prototype.AddClientControl = function (ctrlInfo) {
....
}

It includes no arguments.

For an example that uses the GetControls method, see "Customizing Methods in the Presentation Model to Store Field Values".

GetControls Method

The GetControls method returns the set of controls that the current applet uses. It returns this set as an object. It uses the following syntax:

GetControls()

It includes no arguments.

For an example that uses the AddClientControl method, see "Creating and Managing Client-Side Controls".

GetName Method for Applets

The GetName method that Siebel Open UI uses for applets returns the name of the current applet. It returns this name in a string. It uses the following syntax:

GetName()

It includes no arguments.

For information about the GetName method that Siebel Open UI uses for other classes, see "GetName Method for Applet Controls" see "GetName Method for Application Models".

GetRecordSet Method

The GetRecordSet method returns the current set of records that Siebel Open UI displays in the current applet. It returns these records in an array. It uses the following syntax:

GetRecordSet()

It includes no arguments.

GetSelection Method

The GetSelection method returns the index of the active row of the current record set. It returns this index as a number. It uses the following syntax:

GetSelection()

It includes no arguments.

Applet Control Class

This topic describes the methods that Siebel Open UI uses with the Applet Control class. It includes the following information:

Each applet control references the Applet Control class. Siebel Open UI stores this class in the appletcontrol.js file.

GetCaseSensitive Method

The GetCaseSensitive method determines whether or not a control is case sensitive. It returns one of the following values:

  • 1. The control is case sensitive.

  • 0. The control is not case sensitive.

It uses the following syntax:

GetCaseSensitive()

It includes no arguments.

For example:

if (control.GetCaseSensitive() === "1"){
// This is the account control.
alert ("Make sure you use the correct case.");
}

GetDisabledBmp Method

The GetDisabledBmp method returns the image source configured for a control if the control is disabled. It returns one of the following values depending on whether or not the image exists:

  • Exists. Returns a string that contains the path to the folder that contains the image.

  • Does not exist. Returns nothing.

It uses the following syntax:

GetDisabledBmp()

It includes no arguments.

GetDisplayName Method

The GetDisplayName method returns the display name of a control. It returns this name in a string. It uses the following syntax:

GetDisplayName()

It includes no arguments.

For example:

if (control.GetDisplayName () === "Account Name"){
// This is the account control.
alert ("You are leaving Account. This will trigger an immediate post change.");
}

GetDispMode Method

The GetDispMode method returns the display mode of a control. It returns this name in a string. It uses the following syntax:

GetDispMode()

It includes no arguments.

GetEDEnabled Method

The GetEDEnabled method determines whether or not an Effective Dating (ED) control is enabled. It returns one of the following values:

  • True. Effective Dating control is enabled.

  • False. Effective Dating control is not enabled.

It uses the following syntax:

GetEDEnabled()

It includes no arguments.

GetEnabledBmp Method

The GetEnabledBmp method determines whether or not an image source is configured for a control, whether or not this image source exists, and whether or not this control is enabled. It returns one of the following values depending on whether or not the image exists:

  • Exists. It returns a string that contains the path to the folder that contains the image.

  • Does not exist. It returns nothing.

It uses the following syntax:

GetEnabledBmp()
  • It includes no arguments.

GetFieldName Method

The GetFieldName method returns a string that includes the name of the field where a control is configured. It uses the following syntax:

GetFieldName()

It includes no arguments.

For examples that use GetFieldName, see "Customizing Methods in the Presentation Model to Store Field Values" and "CanNavigate Method".

GetHeight Method

The GetHeight method returns a string that includes the height of a control, in pixels. It uses the following syntax:

GetHeight()

It includes no arguments.

GetIndex Method

The GetIndex method returns the index of a control. This index identifies the control position in the applet. It uses the following syntax:

GetIndex()

It includes no arguments.

GetInputName Method

The GetInputName method returns a string that includes the HTML Name attribute of a control. It uses the following syntax:

GetInputName()

It includes no arguments.

For examples that use the GetInputName method, see the following topics:

GetJustification Method

The GetJustification method returns a string that indicates the text justification. It uses the following syntax:

GetJustification()

It includes no arguments.

For an example that uses the GetJustification method, see "LookupStringCache Method".

GetMaxSize Method

The GetMaxSize method returns the maximum number of characters that the user can enter into a control. It uses the following syntax:

GetMaxSize()

It includes no arguments.

GetMethodName Method

The GetMethodName method returns a string that includes the name of a method that is configured on a control. It uses the following syntax:

GetMethodName()

It includes no arguments.

For an example that uses the GetMethodName method, see "CanInvokeMethod Method for Presentation Models".

GetName Method for Applet Controls

The GetName method that Siebel Open UI uses for applet controls returns the name of an applet control. It returns this name in a string. It uses the following syntax:

GetName()

It includes no arguments.

The following example uses the GetName method:

if (control.GetName() === "Account"){
// This is the account control.
alert ("You are leaving Account. This will trigger an immediate post change");
...

For other examples that use the GetName method, see the following topics:

For information about the GetName method that Siebel Open UI uses for other classes, see "GetName Method for Applets" see "GetName Method for Application Models".

GetPMPropSet Method

The GetPMPropSet method gets the property set for a control. It uses the following syntax:

control.GetPMPropSet(consts.get("SWE_CTRL_PM_PS")

To view an example that uses this method, see "Customizing Control User Properties for Presentation Models".

GetPopupHeight Method

The GetPopupHeight method returns a string that includes one of the following values:

  • The height of the popup that is associated with a control, in pixels.

  • Nothing if Siebel Open UI does not associate a popup dialog box with the control.

It uses the following syntax:

GetPopupHeight()

It includes no arguments.

For an example that uses the GetPopupHeight method, see "GetPopupType Method".

GetPopupType Method

The GetPopupType method identifies the type of popup object that Siebel Open UI associates with a control. It returns a string that includes one of the following values:

  • Pick. Identifies a bounded pick list.

  • Mvg. Identifies a multivalue group.

  • Nothing if Siebel Open UI does not associate a popup dialog box with the control.

It uses the following syntax:

GetPopupType()

It includes no arguments.

The following example uses the GetPopupType method to make sure sufficient space exists to display the popup:

if (control.GetPoupType !== "Pick"){
// There's a Pick defined on this control.
var pHeight = control.GetPopupHeight();
var pWidth= control.GetPopupWidth();
if (pHeight > "60" || pWidth > "200"){
// The pop does not fit in the mobile screen, so we will disable this popup.)
var htmlName = control.GetInputName();
// Set the control into readonly mode.
$("[name=" + htmlName + "]").attr('readonly', true);
}
}

GetPopupWidth Method

The GetPopupWidth method returns a string that includes one of the following values:

  • The width of the popup that is associated with a control, in pixels.

  • Nothing if Siebel Open UI does not associate a popup dialog box with the control.

It uses the following syntax:

GetPopupWidth()

It includes no arguments.

For an example that uses the GetPopupWidth method, see "GetPopupType Method".

GetPrompt Method

The GetPrompt method returns a string that includes the prompt text that Siebel Open UI displays with a control. It uses the following syntax:

GetPrompt()

It includes no arguments.

The following example includes the GetPrompt method:

// Alert the user when he lands in the control
if (document.getActiveElement === control.GetInputName(){
alert (SiebelApp.S_App.LookupStringCache(control.GetPrompt()));
}

GetUIType Method

The GetUIType method returns a string that identifies the type of control. For example, multivalue group, picklist, calculator, and so on. It uses the following syntax:

GetUIType()

It includes no arguments.

GetWidth Method

The GetWidth method returns a string that includes the width of a control, in pixels. It uses the following syntax:

GetWidth()

It includes no arguments.

HandleDeleteNotification Method

The HandleDeleteNotification method deletes the reference to record data that Siebel Open UI stored in the client for a control. For an example that uses the HandleDeleteNotification method, see "Creating and Managing Client-Side Controls".

IsBoundedPick Method

The IsBoundedPick method returns one of the following values:

  • true. The field is a bounded picklist.

  • false. The field is not a bounded picklist.

It uses the following syntax:

IsBoundedPick()

It includes no arguments.

IsCalc Method

The IsCalc method returns one of the following values:

  • true. The field is a calculated field.

  • false. The field is not a calculated field.

It uses the following syntax:

IsCalc()

It includes no arguments.

IsDynamic Method

The IsDynamic method returns one of the following values:

  • true. The control is a dynamic control.

  • false. The control is not a dynamic control.

It uses the following syntax:

IsDynamic()

It includes no arguments.

IsEditEnabled Method

The IsEditEnabled method returns one of the following values:

  • true. The control is editable.

  • false. The control is not editable.

It uses the following syntax:

IsEditEnabled()

It includes no arguments.

IsSortable Method

The IsSortable method returns one of the following values:

  • true. The control is sortable.

  • false. The control is not sortable.

It uses the following syntax:

IsSortable()

It includes no arguments.

NewRecord Method

The NewRecord method initializes a new record that Siebel Open UI adds to the database that resides on the Siebel Server. It uses the following syntax:

BusComp.prototype.NewRecord = function (bInsertBefore, bInternal, pIdValue) {}

where:

  • bInsertBefore can contain one of the following values:

    • true. Specifies to insert the record before the current record.

    • false. Specifies to insert the record after the current record.

  • bInternal can contain one of the following values:

    • true. Configures the object manager to not call the CanInsert method to determine whether or not the insert is valid. Configures Siebel Open UI to not send a postevent notification. You can use true only if specialized business component code calls the NewRecord method.

    • false. Configures the object manager to call the CanInsert method to determine whether or not the insert is valid. Configures Siebel Open UI to send a postevent notification.

  • pIdValue contains the value that Siebel Open UI uses as the Id for the new record. You can specify a value for pIdValue to create a new record with a row Id that you specify. If you do not specify pIdValue, or if it contains no value, then Siebel Open UI automatically creates a new value for the Id.

For examples that use the NewRecord method, see the following topics:

Note the following usage:

  • NewRecord can initialize a new record, and it can also initialize a new record that includes an association with a parent record.

  • You can configure Siebel Open UI to override the NewRecord method.

  • The NewRecord method returns an object that includes an error code and a return value. For more information, see "Configuring Error Messages for Disconnected Clients" and "SetErrorMsg Method".

  • If you use NewRecord in a Siebel Mobile disconnected environment, then NewRecord adds the record to the local database instead of the database that resides on the Siebel Server.

NotifyNewData Method

The NotifyNewData method sends an event notification to the client when Siebel Open UI modifies the value of a field. It returns nothing. It uses the following syntax:

BusComp.prototype.NotifyNewData = function (field_name) {}

where:

  • field_name identifies the name of the field that Siebel Open UI modified.

You can use the NotifyNewData method to make sure Siebel Open UI synchronizes the modified field values between different applets that reside in the same client or that reside in different clients. NotifyNewData also notifies other fields that reference this field.

You can configure Siebel Open UI to override the NotifyNewData method.

PreGetFormattedFieldValue Method

The PreGetFormattedFieldValue method gets the format that a field uses to store the value of a control. For an example that uses the PreGetFormattedFieldValue method, see "Creating and Managing Client-Side Controls".

PostLeaveField Method

The PostLeaveField method temporarily stores a value that the user enters in a control. It stores this value in memory. You use the AddMethod to call the PostLeaveField method. Siebel Open UI then implicitly calls the PostLeaveField method from the LeaveField method that the listapplet.js file specifies. For an example that uses the PostLeaveField method, see "Creating and Managing Client-Side Controls".

SetIndex Method

The SetIndex method sets the index of a control. This index identifies the control position in the applet. The SetIndex method returns nothing. It uses the following syntax:

SetIndex(value)

where:

  • value specifies the number to set for the index.

The following example uses the SetIndex method:

//listOfControls that contains an object of all the controls in the applet
var listOfControls = <AppletPM>.Get("GetControls");
var accountControl = listOfControls["Account"];
var accountIndex= listOfControls["Account"].GetIndex();
var revenueControl = listOfControls["Revenue"];
var revenueIndex= listOfControls["Revenue"].GetIndex();
// Now we can swap the indeces and effectively the tabbing order too.
accountControl.SetIndex (revenueIndex);
revenueControl.SetIndex (accountIndex);

JQ Grid Renderer Class for Applets

This topic describes the methods that Siebel Open UI uses with the JQGridRenderer class. It includes the following information:

Siebel Open UIuses this class to render an applet as a form.

OnControlBlur Method

The OnControlBlur method handles an onblur event for a control that resides in a form applet. It uses the following syntax:

OnControlBlur(arguments)

where:

  • arguments can include the following:

    • rowid

    • cellname

    • value

    • iRow

    • iCol

For information about the OnCtrlBlur method that Siebel Open UI uses with the presentation model for list applets, see "OnCtrlBlur Method".

OnControlMvg Method

The OnControlMvg method handles a multivalue group for a control that resides in a form applet. It uses the following syntax:

OnControlMvg(column_name)

where:

  • column_name identifies the column that includes the multivalue group.

OnControlPick Method

The OnControlPick method handles a picklist for a control that resides in a form applet. It uses the following syntax:

OnControlPick(column_name)

where:

  • column_name identifies the column that includes the picklist.

OnPagination Method

The OnPagination method handles a pagination that occurs in a form applet. It uses the following syntax:

OnPagination(title)

where:

  • title identifies the title of the page.

OnRowSelect Method

The OnRowSelect method handles a row click. It runs if the user clicks a row. It starts the PositionOnRow

that updates the proxy business component. It uses the following syntax:

OnRowSelect(rowId)

where:

  • rowId identifies the row that the user clicked.

Business Service Class

This topic describes the method that Siebel Open UI uses with the Business Service class.

InvokeMethod Method for Business Services

The InvokeMethod method that Siebel Open UI uses for business services calls a method that resides in the proxy instance of a business service. It returns the name of the property set that this business service calls. It uses the same syntax and arguments as the InvokeMethod method that Siebel Open UI uses for application models. For more information, see "InvokeMethod Method for Application Models".

Siebel Open UI uses the GetService method of the application model class to create the method that InvokeMethod calls. For example, assume you must configure Siebel Open UI to call a business service from custom code that resides on the client, and that this code does not bind an applet control that resides in the repository to a business service. You can use InvokeMethod to call a business service method that a business service instance contains.

Assume you must configure Siebel Open UI to call the following business service:

Task UI Service (SWE)

The following code calls a business service method that a business service instance contains:

var service = SiebelApp.S_App.GetService(consts.get("NAME_TASKUISVC"));

For more information, see "GetService Method".

The following code calls the GoToInbox method:

if(service){outPS = service.InvokeMethod("GoToInbox", inPS,true);}

Application Model Class

This topic describes the methods that Siebel Open UI uses with the Application Model class. It includes the following information:

CanInvokeMethod Method for Application Models

The CanInvokeMethod method that Siebel Open UI uses for application models determines whether or not Siebel Open UI can invoke a method. It uses the same syntax as the CanInvokeMethod method that Siebel Open UI uses for presentation models. For more information, see "CanInvokeMethod Method for Presentation Models".

ClearMainView Method

The ClearMainView method removes values for the following items:

  • The view

  • All child objects of the view, such as applets and controls

  • The business object that the view references

  • Child objects of the business object that the view references, such as business components and business component fields

ClearMainView uses the following syntax:

ClearMainView()

ClearMainView only removes values for objects that reside in the client. It does not visually destroy these objects.

If the user attempts to use an object that ClearMainView has cleared, then Siebel Open UI might not work as expected.

GenerateSrvrReq Method

The GenerateSrvrReq method creates a request string that Siebel Open UI sends to the Siebel Server according to the current context of the application. It returns a string that includes a description of the full request. It uses the following syntax:

GenerateSrvrReq (command)

where:

  • command is a string that identifies the name of the command that Siebel Open UI must request.

For example:

var request = SiebelApp.S_App.GenerateSrvrReq("LogOff"));

In this example, the return value includes a string that contains the following information:

http(s)://server_name/callcenter enu/
start.swe?SWECmd=LogOff&SWEKeepContext=1&SWERPC=1&SRN=L8ct6oeEsPA3Cj7pF6spebyCLm2mVGpB0D0tqGMcflcb&SWEC=18&SWEActiveApplet=Client Active Applet&SWEActiveView=Client Active View

GetAccessibilityEnhanced Method

The GetAccessibilityEnhanced method determines whether or not accessibility is enabled. It returns a string that includes one of the following values:

  • true. Accessibility is enabled.

  • false. Accessibility is not enabled.

It uses the following syntax:

GetAccessibilityEnhanced()

It includes no arguments.

GetActiveBusObj Method

The GetActiveBusObj method returns the name of the business object that is currently active in the client. It uses the following syntax:

GetActiveBusObj()

It includes no arguments.

For example:

var busObj = SiebelApp.S_App.GetActiveBusObj();
var busComp = busObj.GetBusCompByName("MyBusComp");
var canUpdate = busComp.CanUpdate();
if (canUpdate){
...

GetActiveView Method

The GetActiveView method returns the name of the view that is currently active in the client. It uses the following syntax:

GetActiveView()

It includes no arguments.

For example:

var view = SiebelApp.S_App.GetActiveView();
var applet = view.GetActiveApplet();
var canUpdate = applet.CanUpdate();
if (canUpdate){
...

For more examples that use the GetActiveView method, see the following topics:

GetAppletControlInstance Method

The GetAppletControlInstance method creates a control. It returns the name of the control that it creates. It uses the following syntax:

GetAppletControlInstance (name, uiType, displayName, width, height)

where:

  • name is a string that contains the name that Siebel Open UI assigns to the control.

  • uiType is a string that identifies the type of the control. For more information, see Siebel Object Types Reference.

  • displayName is a string that contains the name of the control that Siebel Open UI displays in the client.

  • width is a string that contains a number that specifies the width of the control, in pixels.

  • height is a string that contains a number that specifies the height of the control, in pixels.

For example:

var myControl = SiebelApp.S_App.GetAppletControlInstance (
"MyDropDown",
constants.get("SWE_CTRL_COMBOBOX"),
"I want this to appear on the screen",
"50",
"20");

For another example that uses the GetAppletControlInstance method, see "Customizing the Setup Logic of the Presentation Model".

GetAppTitle Method

The GetAppTitle method returns the title of the current Siebel application. It returns this title in a string. It uses the following syntax:

GetAppTitle()

It includes no arguments.

For example:

var appTitle = SiebelApp.S_App.GetAppTitle();
if (appTitle === "Siebel Call Center"){
...

GetDirection Method

The GetDirection method determines the direction that Siebel Open UI uses to display text. It returns one of the following values:

  • RTL. Siebel Open UI is configured so the user reads text from right-to-left.

  • Null. Siebel Open UI is not configured so the user reads text from right-to-left.

It uses the following syntax:

GetDirection()

It includes no arguments.

GetName Method for Application Models

The GetName method that Siebel Open UI uses for application models returns the name of the current Siebel application. For example, Siebel Call Center. It returns this name in a string. It uses the following syntax:

GetName()

It includes no arguments.

For example:

activeView.ExecuteFrame (activeApplet.GetName(), [{field: this.Get("SearchField"), value: this.Get("SearchValue")}])

For information about the GetName method that Siebel Open UI uses for other classes, see "GetName Method for Applets" see "GetName Method for Applet Controls".

GetPageURL Method

The GetPageURL method returns the URL that the Siebel application uses. It returns this value without a query string. For example, it can return the following value:

http://computer_name.example.com/start.swe

It uses the following syntax:

GetPageURL()

It includes no arguments.

For example:

finalurl = SiebelApp.S_App.GetPageURL() + strURL.split("start.swe")[1];

GetProfileAttr Method

The GetProfileAttr method returns the value of a user profile attribute. It uses the following syntax:

GetProfileAttr (attribute_name)

where:

  • attribute_name is a string that includes the name of an attribute.

For examples that use the GetProfileAttr method, see "Adding Custom Manifest Expressions" and "Configuring Siebel Open UI to Use Different Web Templates According to the Applet Mode".

GetService Method

The GetService method creates a business service instance that allows Siebel Open UI to call a business service method that this business service instance contains. It returns the business service name. It uses the following syntax:

SiebelApp.S_App.GetService("name"));

where:

  • name is a string that identifies the name of the business service that GetService calls when it creates the business service instance.

For example, assume you must configure Siebel Open UI to call a business service from custom code that resides on the client, and that this code does not bind an applet control that resides in the repository to a business service. You can use the GetService method to create a business service instance that Siebel Open UI can use to call a business service method that this business service contains.

Assume you must configure Siebel Open UI to call the following business service:

Task UI Service (SWE)

The following code creates an instance of this business service:

var service = SiebelApp.S_App.GetService("Task UI Service (SWE)"));

You can configure Siebel Open UI to call a business service method that this business service contains after this instance is available. For example, the following code calls the GoToInbox method that the Task UI Service (SWE) business service contains:

if(service){outPS = service.InvokeMethod("GoToInbox", inPS,true);}

For more examples that use GetService, see the following topics:

For information about Siebel Open UI uses GetService with InvokeMethod, see "InvokeMethod Method for Business Services".

GotoView Method

The GotoView method navigates the user to a view in the client. It uses the following syntax:

SiebelApp.S_App.GotoView(view, viewId, strURL, strTarget);

where:

  • view is an object that contains the name of the view. It is required. Other arguments are optional.

  • viewId is an object that contains the Id of the view.

  • strURL is an object that contains a string that Siebel Open UI sends as part of the GotoView method. This string must use the HTTP query string format that Siebel CRM requires. For example:

    "SWEParam1=valueForParam1&SWEParam2=valueForParam2"
    
  • strTarget is an object that contains the string target.

For example, assume view contains a value of Account List View. The following code navigates the user to this view:

SiebelApp.S_App.GotoView(view, viewId, strURL, strTarget);

For more examples that use the GotoView method, see the following topics:

For more information about using this method, see "Life Cycle Flows of User Interface Elements".

Work That Siebel Open UI Does When it Runs the GotoView Method

Siebel Open UI does the following work when it runs the GotoView method:

  1. Sets the cursor state to busy.

  2. Runs any required validation steps. If a validation fails in the client, then Siebel Open UI returns a value of false and exits the GotoView method. Implicit Commit is an example of a validation.

  3. Adds default arguments.

  4. Sends a request to the Siebel Server.

  5. Navigates the user to the view that view specifies.

InvokeMethod Method for Application Models

The InvokeMethod method that Siebel Open UI uses for application models calls a method. It returns a value from the method that it calls. It uses the following syntax:

SiebelApp.S_App.InvokeMethod("method_name", psObject, ai);

where:

  • method_name identifies the name of the method that InvokeMethod calls.

  • psObject is an object that contains a property set that InvokeMethod sends as input to the method that it calls, if required.

  • ai is an object that contains information about how to run AJAX. For more information, see "Values That You Can Set for the AI Argument".

For example, the following code calls the NextApplet method. This method sets the next applet as the active applet of a view:

SiebelApp.S_App.InvokeMethod("NextApplet", psObject, ai);

For more examples that use the InvokeMethod method, including for Disconnected clients, see the following topics:  

For more information about using InvokeMethod, see "Calling Methods for Applets and Business Services".

For more information about the InvokeMethod method that Siebel Open UI uses for other classes, see "InvokeMethod Method for Presentation Models" and "InvokeMethod Method for Business Services".

Values That You Can Set for the AI Argument

You can use the ai (additional input) argument to specify how Siebel Open UI runs an AJAX (Asynchronous JavaScript And XML) request. For more information about AJAX, see the Web site that describes Including Ajax Functionality in a Custom JavaServer Faces Component at http://www.oracle.com/technetwork/java/javaee/tutorial-jsp-140089.html.

Table A-9 lists the values that you can use with the ai argument. For example, to use the async value, you use ai.async.

Table A-9 Values That You Can Set for the AI Argument

Value Description

async

Asynchronous. Set to one of the following values:

  • true. Siebel Open UI makes an asynchronous AJAX call.

  • false. Siebel Open UI makes a synchronous AJAX call.

cb

Callback. Identifies the method that Siebel Open UI calls after it receives a reply from the AJAX call. For more information, see "Coding Callback Methods".

scope

Set to the following value:

this

errcb

Error callback. Identifies the method that Siebel Open UI calls after it receives a reply from the AJAX call if this AJAX call fails. For more information, see "Coding Callback Methods".

opdecode

Decode operation. Set to one of the following values:

  • true. Decode the AJAX reply.

  • false. Do not decode the AJAX reply.

mask

Set to one of the following values:

  • true. Mask the screen.

  • false. Do not mask the screen.

If selfbusy is true, then mask does nothing.

selfbusy

Determines whether or not Siebel Open UI displays a busy cursor while it processes the AJAX request. Set to one of the following values:

  • true. Do not display a busy cursor.

  • false. Display a busy cursor.


IsExtendedKeyBoard Method

The IsExtendedKeyBoard method determines whether or not Siebel Open UI is configured to use extended keyboard shortcuts. It returns one of the following values:

  • true. Siebel Open UI is configured to use extended keyboard shortcuts.

  • false. Siebel Open UI is not configured to use extended keyboard shortcuts.

It uses the following syntax:

IsExtendedKeyBoard()

It includes no arguments.

IsMobileApplication Method

The IsMobileApplication method determines whether or not Mobile is enabled for the Siebel application that is currently running in the client. It returns a string that includes one of the following values:

  • true. Mobile is enabled.

  • false. Mobile is not enabled.

It uses the following syntax:

IsMobileApplication()

It includes no arguments.

LogOff Method

The LogOff method calls the Siebel Server, and then returns the Login page to the client. It uses the following syntax:

LogOff()

It includes no arguments.

LookupStringCache Method

The LookupStringCache method gets a string from the client string cache. It uses the following syntax:

LookupStringCache (index)

where:

  • index is a number that identifies the location of a string that resides in the client string cache.

For example:

// Assume appletControl to be the reference of an applet control.
var justification = appletControl.GetJustification(); //Returns text justification in index.
var stringJustification = SiebelApp.S_App.LookupStringCache (justification);
alert (justification); // Will alert "Left" or "Right"

For another example that uses the LookupStringCache method, see "GetPrompt Method".

NewProperty Set Method

The NewPropertySet method creates a new property set instance. It returns this instance. It uses the following syntax:

NewPropertySet ()

It includes no arguments.

For example, the following code resides in the alarm.js file:

var returnPropSet = App ().NewPropertySet();

For more examples that use the NewPropertySet method, see "Customizing the Presentation Model to Delete Records" and "Allowing Users to Interact with Clients During Business Service Calls".

RemoveService Method

The RemoveService method removes a business service from the client. It uses the following syntax:

RemoveService (business_service_name)

where:

  • business_service_name identifies the name of the business service that Siebel Open UI removes.

For example, the following code removes the Task UI Service (SWE) business service:

var service = SiebelApp.S_App.GetService("Task UI Service (SWE)"));
// Use service
...
//Remove service
if (service){

If you use RemoveService to remove a business service that does not exist, then Siebel Open UI might not behave as predicted.

SetDiscardUserState Method

The SetDiscardUserState method sets a property in the client that configures Siebel Open UI to not evaluate the state before it navigates to another view. It uses the following syntax:

SetDiscardUserState (binary)

where:

  • binary is one of the following values:

    • true. Ignore the state before doing navigation. Siebel Open UI applies this logic for all potential states, such as a commit is pending, Siebel Open UI is currently opening a dialog box, and so on. Siebel Open UI runs any GotoView call it receives. It loses the client state.

    • false. Do not ignore the state before doing navigation. Do the client validation.

For example:

// A business condition is met that requires Siebel Open UI to automatically navigate the user.
SiebelApp.S_App.DiscardUserState (true);
// Don't care about user state - we need the navigation to occur.
SiebelApp.S_App.GotoView ("MyView"..);
// Reset
SiebelApp.S_App.DiscardUserState (false);

Control Builder Class

Table A-10 describes the methods that Siebel Open UI uses with the ControlBuilder class.

Table A-10 Methods You Can Use with the SiebelAppFacade.ControlBuilder Class

Method Description

Pick

You can use the following properties of the configuration object:

  • target. Specifies the DOM element as a jQuery object.

  • click. Attaches a callback method.

  • scope. Specifies the scope.

  • control. Sent as an argument to the callback method that the click property specifies. For more information, see "Coding Callback Methods".

  • className. Modifies the CSS style of the pick icon.

Mvg

DatePick

You can use the following properties of the configuration object:

  • target. Specifies the input control DOM element as a jQuery object with a calendar icon and attaches a DatePicker event.

    Configures Siebel Open UI to display a dialog box that contains only date options if the user clicks the calendar icon.

    DateTimePick does the same as DatePick except the dialog box allows the user to set the date and time.

  • className. Identifies the class.

DateTimePick


Locale Object Class

This topic describes the methods that Siebel Open UI uses with the Locale Object class. It includes the following information:

FormattedToString Method

The FormattedToString method removes the formatting of a string. It returns the unformatted string. It uses the following syntax:

FormattedToString(type,value,format)

where:

  • type is a string that identifies the value type of the string. For example: Phone, Currency, DateTime, or Integer.

  • value is a string that identifies the formatted value of the string.

  • format is a string that identifies the optional format of the string.

For example:

SiebelApp.S_App.LocaleObject.FormattedToString("date","11/05/2012","M/D/YYYY")

GetCurrencyList Method

The GetCurrencyList method returns the currency list that the client computer supports. It uses the following syntax:

GetCurrencyList()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetCurrencyList()

GetDateFormat Method

The GetDateFormat method returns the date format for the locale. It uses the following syntax:

GetDateFormat()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetDateFormat()

GetDayOfWeek Method

The GetDayOfWeek method returns a string that identifies the day of the week. It uses the following syntax:

GetDayOfWeek(day,format)

where:

  • day is a number that indicates the index of the day.

  • format is string that specifies the day format.

For example:

SiebelApp.S_App.LocaleObject.GetDayOfWeek(20,"M/D/YYYY")

GetDispCurrencyDecimal Method

The GetDispCurrencyDecimal method returns the decimal point symbol that the client uses for currency, such as a period (.). It uses the following syntax:

GetDispCurrencyDecimal()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetDispCurrencyDecimal()

GetDispCurrencySeparator Method

The GetDispCurrencySeparator method the number separator that the currency uses to separate digits in a currency, such as a comma (,). It uses the following syntax:

GetDispCurrencySeparator()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetDispCurrencySeparator()

GetDispDateSeparator Method

The GetDispDateSeparator method returns the symbol that the client uses to separate the days, weeks, and months of a date. It uses the following syntax:

GetDispDateSeparator()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetDispDateSeparator()

GetDispNumberDecimal Method

The GetDispNumberDecimal method returns the symbol that the client uses for the decimal point. For example, a period (.). It uses the following syntax:

GetDispNumberDecimal()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetDispNumberDecimal())

GetDispNumberScale Method

The GetDispNumberScale method returns the number of fractional digits that the client displays. For example, 2. It uses the following syntax:

GetDispNumberScale()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetDispNumberScale()

GetDispNumberSeparator Method

The GetDispNumberSeparator method returns the symbol that the client uses to separate digits in a number. For example, the comma (,). It uses the following syntax:

GetDispNumberSeparator()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetDispNumberSeparator())

GetDispTimeAM Method

The GetDispTimeAM method returns the localized string for AM. For example, AM. It uses the following syntax:

GetDispTimeAM()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetDispTimeAM()

GetDispTimePM Method

The GetDispTimePM method returns the localized string for PM. For example, PM. It uses the following syntax:

GetDispTimePM()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetDispTimePM()

GetDispTimeSeparator Method

The GetDispTimeSeparator method returns the symbol that the client uses to separate the parts of time. For example, the colon (:) symbol. It uses the following syntax:

GetDispTimeSeparator()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetDispTimeSeparator()

GetExchangeRate Method

The GetExchangeRate method calculates the exchange rate between two currencies. It returns the exchange rate as a double precision, floating point number. It uses the following syntax:

GetExchangeRate(input_value, output_value, exchange_date)

where:

  • input_value is a string that identifies the currency code that Siebel Open UI uses for the input value when it calculates the exchange rate.

  • output_value is a string that identifies the currency code that Siebel Open UI uses for the output value when it calculates the exchange rate.

  • exchange_date is a string that includes the date of the currency exchange.

For example:

SiebelApp.S_App.LocaleObject.GetExchangeRate("USD", "INR", "11/05/2012")

GetFuncCurrCode Method

The GetFuncCurrCode method returns the currency code that the client uses. For example, USD. It uses the following syntax:

GetFuncCurrCode()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetFuncCurrCode()

GetLocalString Method

The GetLocalString method returns the localized string of a key. It uses the following syntax:

GetLocalString(pStringKey : string_name : message_key)

where:

  • pStringKey is a property set that includes the string key.

  • string_name is a string that identifies the name of the localized string that GetLocalString gets.

For example, the following code uses the GetLocalString method when using Siebel Open UI with a connected client:

SiebelApp.S_App.LocaleObject.GetLocalString("IDS_SWE_LOADING_INDICATOR_TITLE")

For another example, the following code uses the GetLocalString method when using Siebel Open UI with Siebel Mobile disconnected:

SiebelApp.S_App.OfflineLocaleObject.GetLocalString("IDS_SWE_LOADING_INDICATOR_TITLE")

GetMonth Method

The GetMonth method returns the month that the locale uses. It uses the following syntax:

GetMonth()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetMonth()

GetScale Method

The GetScale method returns the scale of the number that Siebel Open UI must display. It uses the following syntax:

GetScale()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetScale()

GetStringFromDateTime Method

The GetStringFromDateTime method formats a date and time string. It returns this formatted date and time in a string. It uses the following syntax:

GetStringFromDateTime(input_date, input_format, output_format)

where:

  • input_date specifies the date that GetStringFromDateTime formats.

  • input_format describes how input_date is formatted.

  • output_format specifies how to format the output.

For example:

SiebelApp.S_App.LocaleObject.GetStringFromDateTime(2012-12-05, DD/MM/YYYY, M/D/YYYY)

GetTimeFormat Method

The GetTimeFormat method returns the time format that the locale uses. It uses the following syntax:

GetTimeFormat()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetTimeFormat()

GetTimeZoneList Method

The GetTimeZoneList method returns a list of time zones that the locale uses. It uses the following syntax:

GetTimeZoneList()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetTimeZoneList()

GetTimeZoneName Method

The GetTimeZoneName method returns the current time zone that the locale uses. It uses the following syntax:

GetTimeZoneName()

It includes no arguments.

For example:

SiebelApp.S_App.LocaleObject.GetTimeZoneName()

SetCurrencyCode Method

The SetCurrencyCode method sets the currency code that the locale uses. It returns nothing. It uses the following syntax:

SetCurrencyCode(currency_code)

where:

  • currency_code is a string that includes the currency code.

For example:

SiebelApp.S_App.LocaleObject.SetCurrencyCode("USD")

SetExchDate Method

The SetExchDate method sets the exchange date that the currency uses. It returns nothing. It uses the following syntax:

SetExchDate(exchange_date)

where:

  • exchange_date is a string that includes the exchange date.

For example:

SiebelApp.S_App.LocaleObject.SetExchDate("11/05/2012")

SetScale Method

The SetScale method sets the scale of the number. It returns nothing. It uses the following syntax:

SetScale(scale)

where:

  • scale is a string that includes the number that SetScale uses to set the scale.

For example:

SiebelApp.S_App.LocaleObject.SetScale("0")

StringToFormatted Method

The StringToFormatted method adds formatting characters to a string. It returns a formatted string. It uses the following syntax:

StringToFormatted(type,value,format)

The StringToFormatted method uses the same arguments that the FormattedToString method uses. For more information, see "FormattedToString Method".

For example:

SiebelApp.S_App.LocaleObject.StringToFormatted("date","11/05/2012","M/D/YYYY")

Component Class

This topic describes the methods that Siebel Open UI uses with the Component class. It includes the following information:

Component Method

The Component method is a constructor that creates a component object. It returns nothing. It uses the following syntax:

Component()

It includes no arguments.

For example:

var cmpObj = new SiebelAppFacade.Component();

GetChildren Method

The GetChildren method identifies all child components that a parent component contains. It returns these child components in an array. If no child components exist, then it returns nothing. It uses the following syntax:

GetChildren()

It includes no arguments.

For example:

var childrenCmp = cmpObj.GetChildren();

where:

  • cmpObj references a component object.

GetParent Method

The GetParent method gets the parent component object. Siebel Open UI uses a tree structure to manage components. It uses this structure to identify the parent component that a query examines. It uses the following syntax:

GetParent()

It includes no arguments.

For example:

var parentObj = cmpObj.GetParent();

where:

  • cmpObj references a component object.

GetPM Method for Components

The GetPM method that Siebel Open UI uses for components returns the presentation model object that the component references. It uses the following syntax:

GetPM()

It includes no arguments.

For example:

var pmObj = cmpObj.GetPM();

where:

  • cmpObj references a component object.

If you use GetPM before Siebel Open UI runs the setup call for the component, then GetPM returns a value that indicates that Siebel Open UI has not yet defined the presentation model object that this component references.

For information about the GetPM method that Siebel Open UI uses for physical renderers, see "GetPM Method for Physical Renderers".

GetPR Method

The GetPR method returns a physical renderer object that is associated with a component. It uses the following syntax:

GetPR()

It includes no arguments.

For example:

var prObj = cmpObj.GetPR();

where:

  • cmpObj references a component object.

Siebel Open UI defers creating the physical renderer until it calls the Show function in the component.

GetSiblings Method

The GetSiblings method returns all siblings. In this context, a sibling is a component that reside at same the level in the component tree structure as the component that it calls. It returns these values in an array. If no other components reside at the same level, then it returns nothing. The GetSiblings method uses the following syntax:

GetSiblings()

It includes no arguments.

For example:

var siblingObjs = cmpObj.GetSiblings();

where:

  • cmpObj references a component object.

Setup Method for Components

The Setup method that Siebel Open UI uses with components does the basic setup for the component instance, and then prepares the presentation model that this component instance references. It calls the Setup method that resides in this presentation model. It uses the following syntax:

Setup(property_set)

where:

  • property_set identifies a property set that Siebel Open UI passes to the presentation model that the component references.

The Component Manager calls the Setup method. It is recommended that you do not configure Siebel Open UI to directly call the setup method on any component object.

For more information about the Setup method that Siebel Open UI uses with presentation models, see "Setup Method for Presentation Models".

Show Method for Components

The Show method that Siebel Open UI uses for components shows a component. It uses the following syntax:

Show()

It includes no arguments.

Siebel Open UI uses the Component Manager to call the Show method for a component. This Show method does the following work during this call:

  • If the physical renderer object does not already exist, then the Component Manager creates it.

  • Calls the following methods that reside in the physical renderer:

    • ShowUI

    • BindEvents

    • BindData

    For more information about how Siebel Open UI uses these methods, see "Life Cycle of a Physical Renderer".

  • Calls the Show method for every component object it creates while it runs, as necessary.

In some situations, Siebel Open UI might not finish calling the Setup method if it creates the component after the Component Manager life cycle finishes. In this situation, Siebel Open UI can use the Show method to call this component to make sure that it completes this life cycle successfully. For more information, see "Setup Method for Components".

It is recommended that you not configure Siebel Open UI to make a direct call to the Show method for a component.

For more information about using the Show method, see "Life Cycle Flows of User Interface Elements".

For information about the Show method that Siebel Open UI uses for component managers, see "Show Method for Component Managers".

Component Manager Class

This topic describes the methods that Siebel Open UI uses with the Component Manager class. It includes the following information:

The Component Manager class manages components in Siebel Open UI. It can create or delete components and it allows you to configure Siebel Open UI to search for a component according to criteria that you specify.

DeleteComponent Method

The DeleteComponent method deletes a component from the component tree. It uses the following syntax:

DeleteComponent(cmpObj)

where:

  • cmpObj references a component object.

For example, the following code deletes the component that cmpObj references:

SiebelAppFacade.ComponentMgr.DeleteComponent(cmpObj);

FindComponent Method

The FindComponent method identifies a component according to the criteria that a function specifies. It returns an array that includes component names. If it cannot identify any components, then it returns nothing. It uses the following syntax:

FindComponent({id : "custom_dependency_object"});

Finding Components According to IDs

Siebel Open UI maps the Id of the component to the name of this component. It does the same mapping when it uses the MakeComponent method to create a dependency. You can use the following code to find a component according to the component Id:

var cmpObj = SiebelAppFacade.ComponentMgr.FindComponent({id :
"custom_dependency_object"});

Getting Parents, Siblings, and Children

If you provide a component and a relation, then the FindComponent method gets a list of components according to the component and relation that you specify. You use the following code:

var cmprelationship = SiebelAppFacade.ComponentMgr.FindComponent({cmp: cmpObj, rel : consts.get("values")});

where:

  • relationship specifies a parent, sibling, or child relationship.

  • cmp is an abbreviation for component. cmpObj identifies the component.

  • rel is an abbreviation for relation. It identifies the type of relationship.

  • values specifies the values to get. To get a list of:

    • Parents, you use SWE_CMP_REL_SIBLING

    • Siblings, you use SWE_CMP_REL_SIBLING

    • Children, you use SWE_CMP_REL_CHILDREN

For example, the following code gets a list of parents:

var cmpParent = SiebelAppFacade.ComponentMgr.FindComponent({cmp: cmpObj, rel : consts.get("SWE_CMP_REL_PARENT")});

MakeComponent Method

The MakeComponent method creates a component. It returns nothing. It uses the following syntax:

SiebelAppFacade.ComponentMgr.MakeComponent(parent,psInfo, dependency);

where:

  • parent identifies the parent of the component that Siebel Open UI creates. For example, a view, applet, and so on.

  • psInfo contains property set information that identifies the name of the module that Siebel Open UI uses for the presentation model and the physical renderer. Siebel Open UI uses this property set information to create the presentation model. It also passes this property set to the setup method that it uses to set up the presentation model.

  • dependency identifies an object that Siebel Open UI uses as a template to create the presentation model. If the presentation model must reference an applet or view, then this dependency must also reference this same applet or view. To specify the dependency for a local component, you must use an object that references the GetName method.

The MakeComponent method does the following work:

  • Creates a component.

  • Attaches this component to the component tree. It attaches this component at the tree level that Siebel Open UI uses for user interface objects.

  • Calls the Setup method that Siebel Open UI uses to create the new component. This Setup method uses information that the psInfo argument of the MakeComponent method specifies. It uses this information to create the presentation model. For more information, see "Setup Method for Components".

  • Calls the Setup method that Siebel Open UI uses for the presentation model. This method binds all objects that are involved in the life cycle that Siebel Open UI runs for the component. For more information, see "Setup Method for Presentation Models".

For an example that uses the MakeComponent method, see "Creating Components".

Show Method for Component Managers

The Show method that Siebel Open UI uses for component managers displays components. It uses the following syntax:

Show()

It includes no arguments.

The Show method that Siebel Open UI uses for component managers calls a show on the component object. This component object then calls a Show method on the physical renderer that the component references.

You can use the Show method to configure Siebel Open UI to display all components that reside in the tree that contains the component. If you must configure Siebel Open UI to display only one component, then is recommended that you use the Show method on each individual component.

For information about the Show method that Siebel Open UI uses for components, see "Show Method for Components".

Other Classes

This topic describes methods that reside in a class that this appendix does not describe elsewhere.

Define Method

The Define method identifies the modules that Siebel Open UI uses to determine the location of the presentation model file or physical renderer file that Siebel Open UI must download to the client. It uses the following syntax:

define (module_name ,list_of_dependencies,function);

where:

Siebel Open UI recommends that you use the following syntax when you use the define method:

if(typeof("SiebelAppFacade.module_name") === undefined){
  SiebelJS.Namespace("SiebelAppFacade.module_name");
define("siebel/custom/module_name", [], function(){
  SiebelAppFacade.module_name  = (function(){
   var consts = SiebelJS.Dependency("SiebelApp.Constants");
   function module_name (){
       SiebelAppFacade.module_name.superclass.constructor.apply(this,
arguments);;
        };
        SiebelJS.Extend(module_name, SiebelAppFacade.arguments_2);
        return module_name:
      })();
      return SiebelAppFacade.module_name;
 });
}

where:

  • SiebelAppFacade is the name space.

  • module_name identifies the file name of the presentation model or the physical renderer without the file name extension. For example:

    RecycleBinPModel
    
  • function defines the class constructor.

You use the Define method when you set up a presentation model or a physical renderer. For an example usage of this method when setting up:

For information about how to add manifest files and manifest expressions that reference the module_name, see "Configuring Manifests".

Siebel Open UI uses this Define method to make sure that your code meets the requirements that Asynchronous Module Definition (AMD) specifies. For reference information about:

  • AMD, see the topic that describes Asynchronous Module Definition at the following address at the gitub.com website:

    https://github.com/amdjs/amdjs-api/wiki/AMD

  • AMD, see the topic that describes AMD at the following address at the requirejs.org website:

    http://requirejs.org/docs/whyamd.html

  • Writing JavaScript with AMD, see the topic that describes writing modular JavaScript with AMD at the following address at the addyosmani.com website:

    http://addyosmani.com/writing-modular-js/

ShowErrorMessage Method

The ShowErrorMessage method specifies the error message that Siebel Open UI displays. It returns nothing. It uses the following syntax:

ShowErrorMessage(error_message)

where:

  • error_message is a string that contains the text of the error message.