Configuring Siebel Open UI > Siebel Open UI Application Programming Interface > Methods of the Siebel Open UI Application Programming Interface >

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 28 lists the properties of the presentation model that Siebel Open UI uses for a list applet.

Table 28. 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 29 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 29. 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){
  }

Configuring Siebel Open UI Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.