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

Presentation Model Methods for List Applets


This topic describes the presentation model that Siebel Open UI uses for list applets. It includes the following topics:

The presentation model that Siebel Open UI uses for list applets uses the ListPresentationModel class, which is a subclass of the Base Applet PresentationModel class that the presentation model for predefined applets use. For more information, see Presentation Model Methods for Applets.

It stores this presentation model in the listpmodel.js file.

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

Table 17 lists the properties of the presentation model that Siebel Open UI uses for a list.

Table 17. Properties of the Presentation Model That Siebel Open UI Uses for Lists
Property
Description

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]

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 selected.
  • false. The row is not selected.

GetRowIdentifier

Returns a string that contains accessibility information.

HasHierarchy

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

GetRowListRowCount

Returns the number of rows or records that a list applet contains.

GetBeginRow

Returns the beginning row number of a list applet.

Summary of Methods That You Can Use With the Presentation Model That Siebel Open UI Uses for Lists

Table 18 summarizes the methods that you can use with the presentation model that Siebel Open UI uses for a list. You cannot customize or override any of these methods.

Table 18. Summary of Methods That You Can Use With the Presentation Model That Siebel Open UI Uses for Lists
Method
Callable
Bindable
HandleRowSelect(rowId, ctrlKey, shiftKey)
Yes
Yes
OnVerticalScroll(action)
Yes
No
SetMultiSelectMode(bIsInMultiSelectMode)
No
Yes
OnClickSort(controlName, direction)
Yes
No
OnCtrlBlur(row,control,value)
Yes
No
OnCtrlFocus(row,control,value)
Yes
No
OnDrillDown(controlName, rowNum)
Yes
No
CellChange(rowId, fieldName , value)
No
Yes

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 validation failure in the client or on the Siebel Server.

It uses the following syntax:

HandleRowSelect(rowId, ctrlKey, shiftKey);

where:

  • rowId is a number range of zero through n, where n is the maximum number of rows that the list applet displays.
  • ctrlKey is one of the following values:
    • true. The user pressed the CTRL key when choosing the record.
    • false. The user pressed the CTRL key when choosing the record.
  • shiftKey is one of the following values:
    • true. The user pressed the SHIFT key when choosing the record.
    • false. The user pressed the SHIFT key when choosing the record.
Example

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

this.HandleRowSelect(0, false, false);

In another example, assume the rowId is 0, ctrlKey is false, and shiftKey is false. The following code requests the proxy to choose the first row in the record set:

this.ExecuteMethod( "HandleRowSelect", 0-10, ctrlKey, shiftKey );

OnVerticalScroll Method

The OnVerticalScroll method scrolls a record set. It returns nothing.

It uses the following syntax:

OnVerticalScroll(scrollAction);

where:

  • scrollAction 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.

    bReturn = this.GetProxy().OnVerticalScroll(scrollAction);

For example, the following code instructs Siebel Open UI to scroll to the next record:

bReturn = this.GetProxy().OnVerticalScroll(scrollAction);

You add the following code to the physical renderer:

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

This method is asynchronous, so binding is not helpful.For more information, see About Synchronous and Asynchronous Requests.

SetMultiSelectMode Method

The SetMultiSelectMode method determines if a list applet is moving into or out of multiselection mode. It uses the following syntax:

SetMultiSelectMode(bInMultiSelMode)

where:

  • bIsInMultiSelectMode is one of the following values:
    • true. Grid is moving into multiselect mode.
    • false. Grid is moving out of multiselect mode.

It returns nothing.

Example

For example, the following code from 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. This binding allows the physical renderer to know when the list is moving in or out of multiselection mode:

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

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. Sorts the control in ascending order.
    • desc. Sorts the control in descending order.

This method is asynchronous, so binding is not helpful. For more information, see About Synchronous and Asynchronous Requests.

Example

For example, the following code from the listrenderer.js file:

bReturn = this.GetProxy().OnClickSort(name, direction);

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

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

OnCtrlBlur Method

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

OnCtrlBlur( rowId, control, value );

where:

  • rowId identifies the row that contains the control that Siebel Open UI must blur.
  • control identifies the control in the applet that Siebel Open UI must blur.
  • value contains the value of the physical instance of the control. The caller must also provide the value present in control to the proxy to register it appropriately.

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

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 silently rejects any OnCtrlBlur call.

For example:

this.ExecuteMethod( "OnCtrlBlur", rowId, control, value );

OnCtrlFocus Method

The OnCtrlFocus method makes a control active. It uses the following syntax:

OnCtrlFocus( rowId, control, value );

where:

  • rowId identifies the row that contains the control that Siebel Open UI must make active.
  • control identifies the control in the applet that Siebel Open UI must make active.
  • value contains the physical instance of the control. The caller must provide the value present in control to the proxy to register it appropriately.

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

For example:

this.ExecuteMethod( "OnCtrlFocus", rowId, control, value );

OnDrillDown Method

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

  • true. Drilldown succeeded.
  • false. Drilldown failed because validation failed on the client or on the Siebel Server.

It uses the following syntax:

OnDrillDown( ctrlName, rowId );

where:

  • ctrlName identifies the name of the control where Siebel Open UI does the drilldown.
  • rowId identifies the RowId of the record where Siebel Open UI does the drilldown.

For example:

this.ExecuteMethod( "OnDrillDown", ctrlName, rowId );

CellChange Method

The CellChange method determines if the value in a control changed. If the value changed, then it returns the new value. It uses the following syntax:

CellChange( rowId, fieldName, value );

where:

  • rowId identifies the row Id of a row that Siebel Open UI displays in a list applet.
  • fieldName identifies the name of the control that Siebel Open UI analyzes to determine if the value changed.
  • value a localized value that the control contains.

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

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

The physical renderer can bind to the CellChange method to detect if the value for the control changed.

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