| Bookshelf Home | Contents | Index | PDF | ![]() |
|
Configuring Siebel Open UI > Siebel Open UI Application Programming Interface > Classes and Methods of the Siebel Open UI Application Programming Interface > Application Model ClassThis topic describes the Application Model class. It includes the following topics:
You can use this class to configure Siebel Open UI to call a business service that resides on the Siebel Server. Siebel Open UI defines this class in file. CallServer MethodThe CallServer method sends a request to the Siebel Server. It includes the input property set that the request requires. Siebel Open UI takes care of attaching any default parameters, such as the SWECount parameter, and so forth. It returns nothing.It uses the following syntax: SiebelApp.S_App.CallServer (inputPS, retPropSet, needProcessResponse, lp);
For example, the following code in the pmodel.js file: SiebelApp.S_App.CallServer (inPropSet, outPropSet, true, lp); CanInvokeMethod MethodThe CanInvokeMethod method determines if Siebel Open UI can call a method. It returns a string that includes one of the following values: To avoid an error on the Siebel Server, it is recommended that you use CanInvokeMethod immediately before InvokeMethod to make sure Siebel Open UI can call the method. ClearMainView MethodThe ClearMainView method removes the values for the following items:
ClearMainView only removes values for internal objects that reside in the client. It does not visually destroy these objects. If the user attempts to use an object that ClearMainView has modified, then Siebel Open UI might not function as expected. GenerateSrvrReq MethodThe 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: 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 MethodThe GetAccessibilityEnhanced method determines if accessibility is enabled. It returns a string that includes one of the following values: GetActiveBusObj MethodThe GetActiveBusObj method returns the name of the business object that is currently active in the client. For example: var busObj = SiebelApp.S_App.GetActiveBusObj(); GetActiveView MethodThe GetActiveView method returns the name of the view that is currently active in the client. For example: var view = SiebelApp.S_App.GetActiveView(); GetAppTitle MethodThe GetAppTitle method returns the title of the Siebel application in a string. For example: var appTitle = SiebelApp.S_App.GetAppTitle(); GetAppletControlInstance MethodThe GetAppletControlInstance method creates a control. It returns the name of the control. It uses the following syntax: GetAppletControlInstance ( name, uiType, displayName, width, height) var myControl = SiebelApp.S_App.GetAppletControlInstance ( GetConstructorFromKey MethodThe GetConstructorFromKey method returns the constructor that Siebel Open UI registers in the client against the rendering key that it passes to the method. It returns this constructor in a string that Siebel Open UI resolves according to the name space. It uses the following syntax:
var myConstructor = SiebelApp.S_App.GetConstructorFromKey( "CarouselPModel" ); You can use GetConstructorFromKey to create an instance of the constructor to meet your customization requirements RegisterConstructorAgainstKey MethodThe RegisterConstructorAgainstKey method registers a constructor string that Siebel Open UI resolves according to the name space that it uses against a rendering key. It uses the following syntax: RegisterConstructorAgainstKey (key, constructor)
var CarouselConstructor = "SiebelAppFacade.CarouselPModel"; GetDirection MethodThe GetDirection method returns one of the following values:
GetName MethodThe GetName method returns the name of Siebel business application. For example, Siebel Call Center. It returns this value as a string. It uses the following syntax: activeView.ExecuteFrame (activeApplet.GetName(), [{field: this.Get( "SearchField" ), value: this.Get( "SearchValue" )}]) GetPageURL MethodThe GetPageURL method returns the URL that the Siebel business application uses. It returns this value without a query string. For example, it can return the following value: http://computerName.corp.siebel.com/start.swe The GetPageURL method includes no parameters. finalurl = SiebelApp.S_App.GetPageURL() + strURL.split("start.swe")[1]; GetProfileAttr MethodThe GetProfileAttr method returns the value of a user profile attribute. GetProfileAttr (attributeName) SetProfileAttr MethodThe SetProfileAttr method assigns a value to a user profile attribute. SetProfileAttr (attributeName, attributeValue)
GetService MethodThe GetService method creates a business service proxy that calls a business service method. It creates an instance of a business service object that allows the interface to call a method on this business service.It returns the name of the business service object. It uses use the following syntax: SiebelApp.S_App.GetService( "name") );
ExampleAssume 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 instantiate the service proxy that Siebel Open UI uses to call any method on the business service. Assume you must call the following business service: The following code instantiates the proxy instance for this business service: var service = SiebelApp.S_App.GetService( "Task UI Service (SWE)" ) ); You can configure Siebel Open UI to call any method on this business service after this instance is available. For example, the following code calls the GoToInbox method on the Task UI Service (SWE) business service: if( service ){ outPS = service.InvokeMethod( "GoToInbox", inPS,true ); } For more information about InvokeMethod, see Business Service Class and InvokeMethod Method. RemoveService MethodThe RemoveService method removes a service from the client. It uses the following syntax: For example, the following code removes the service that the GetService method references: var service = SiebelApp.S_App.GetService( "Task UI Service (SWE)" ) ); If you use RemoveService to remove a service that does not exist, then Siebel Open UI might not behave as predicted. GotoView MethodThe GotoView method navigates the user to a view in the client. It uses the following syntax: SiebelApp.S_App.GotoView(view, viewId, strURL, strTarget);
For example, assume the view object contains a value of Account List View. The following code navigates the user to this view: SiebelApp.S_App.GotoView(view, viewId, strURL, strTarget); Siebel Open UI does the following work when it runs the GotoView method:
IsExtendedKeyBoard MethodThe IsExtendedKeyBoard method returns one of the following values:
IsMobileApplication MethodThe IsMobileApplication method determines if 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: For example, the following code determines if Mobile is enabled, and then does something if IsMobileApplication does not return a value of true: if ( SiebelApp.S_App.IsMobileApplication() !== "true" ) InvokeMethod MethodThe InvokeMethod method calls a method. It returns a value from the method that it calls. It uses the following syntax: SiebelApp.S_App.InvokeMethod( "methodName", psObject, lp );
The following example changes the next applet to become the active applet of the view: SiebelApp.S_App.InvokeMethod( "NextApplet", psObject, lp ); LogOff MethodThe LogOff method calls the Siebel Server and returns the Login page to the user. LookupStringCache MethodThe LookupStringCache method gets a string from the client string cache. It uses the following syntax: // Assume appletControl to be the reference of an applet control. NewProperty Set MethodThe NewPropertySet method creates a new property set object. It returns the object reference for this new property set. It uses the following syntax: For example, the following code in the alarm.js file: var returnPropSet = App ().NewPropertySet(); SetDiscardUserState MethodThe SetDiscardUserState method sets a property in the client that instructs Siebel Open UI to not evaluate the state before it navigates to another view. It uses the following syntax: SetDiscardUserState (bDiscard)
// A business condition is met that requires Siebel Open UI to automatically navigate the user. |
![]() |
![]() |
| Configuring Siebel Open UI | Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |