Bookshelf Home | Contents | Index | PDF |
Configuring Siebel Open UI > Application Programming Interface > Methods of the Siebel Open UI Application Programming Interface > Application Model ClassThis topic describes the methods that Siebel Open UI uses with the Application Model class. It includes the following information:
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. The ClearMainView method removes values for the following items:
ClearMainView uses the following syntax: 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. 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: 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 The GetActiveBusObj method returns the name of the business object that is currently active in the client. It uses the following syntax: var busObj = SiebelApp.S_App.GetActiveBusObj(); var busComp = busObj.GetBusCompByName("MyBusComp"); var canUpdate = busComp.CanUpdate(); The GetActiveView method returns the name of the view that is currently active in the client. It uses the following syntax: var view = SiebelApp.S_App.GetActiveView(); var applet = view.GetActiveApplet(); var canUpdate = applet.CanUpdate(); For more examples that use the GetActiveView method, see the following topics:
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)
var myControl = SiebelApp.S_App.GetAppletControlInstance ( constants.get("SWE_CTRL_COMBOBOX"), "I want this to appear on the screen", For another example that uses the GetAppletControlInstance method, see Customizing the Setup Logic of the Presentation Model. The GetAppTitle method returns the title of the current Siebel application. It returns this title in a string. It uses the following syntax: var appTitle = SiebelApp.S_App.GetAppTitle(); if (appTitle === "Siebel Call Center"){ The GetDirection method determines the direction that Siebel Open UI uses to display text. It returns one of the following values:
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: 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. 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 finalurl = SiebelApp.S_App.GetPageURL() + strURL.split("start.swe")[1]; The GetProfileAttr method returns the value of a user profile attribute. It uses the following syntax: GetProfileAttr (attribute_name)
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. 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"));
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: 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. 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);
For example, assume 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. Siebel Open UI does the following work when it runs the GotoView method:
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);
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. The IsExtendedKeyBoard method determines whether or not Siebel Open UI is configured to use extended keyboard shortcuts. It returns one of the following values:
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: The LogOff method calls the Siebel Server, and then returns the Login page to the client. It uses the following syntax: The 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. 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. The NewPropertySet method creates a new property set instance. It returns this instance. It uses the following syntax: 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. The RemoveService method removes a business service from the client. It uses the following syntax: RemoveService (business_service_name) For example, the following code removes the Task UI Service (SWE) business service: var service = SiebelApp.S_App.GetService("Task UI Service (SWE)")); If you use RemoveService to remove a business service that does not exist, then Siebel Open UI might not behave as predicted. 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:
// 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. |
Configuring Siebel Open UI | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |