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

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

    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.

    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);

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