Siebel CRM Configuring Siebel Open UI Siebel Innovation Pack 2015 E52417-01 |
|
Previous |
Next |
View PDF |
Siebel Open UI supports your existing browser script. However, it is recommended that you customize a presentation model instead of using browser script. It is recommended that you gradually move any logic that you implement through your existing browser script to the presentation model.
You can write a browser script in JavaScript. This script can interact with the Document Object Model (DOM) and with the Siebel Object Model that is available in the Web browser through a shadow object. You can script the behavior of Siebel events and the browser events that the DOM exposes.
Siebel Open UI uses a JavaScript environment that allows you to implement browser scripting. This JavaScript API can dynamically refresh page content and instantly commit customization modifications. If your implementation currently uses browser scripting, then you can refactor JavaScript to move from your existing employee application to Siebel Open UI. Refactoring is the process of modifying the internal structure of existing code without modifying the external behavior of this code. For more information about this JavaScript API, see Appendix A, "Application Programming Interface."
The following pseudocode describes the sequence that Siebel Open UI uses if your deployment includes custom browser script:
PR calls a PM method or event PM method or event calls an applet proxy method applet proxy method calls Applet_PreInvokeMethod on browser script applet proxy uses Call-Server to run applet method on Siebel Server PM runs Attach Pre Proxy binding for this applet method applet proxy calls Applet_InvokeMethod that resides in browser script PM runs Attach Post Proxy binding for this applet method applet proxy method ends PM method or event ends PR call ends
where:
PR is the physical renderer
PM is the presentation model
For example, the following pseudocode describes the sequence that Siebel Open UI uses if the user clicks New in an applet, and if your deployment includes custom browser script that uses a method named NewRecord:
PR calss PM.OnControlEvent PM.OnControlEvent calls Applet.InvokeMethod Applet.InvokeMethod calls BrowserScript.Applet_PreInvokeMethod Applet.InvokeMethod calls Siebel Server to run NewRecord method on applet PM calls PM.AttachPreProxyExecuteBinding for the NewRecord method Applet.InvokeMethod calls BrowserScript.Applet_InvokeMethod PM calls PM.AttachPostProxyExecuteBinding for the NewRecord method Applet.InvokeMethod ends PM.OnControlEvent ends PR call ends
Siebel Open UI uses browser script through a JavaScript shadow object, which is a type of object that Siebel Open UI uses for client scripting. All other client objects include a corresponding shadow object, except for the PropertySet. For example, the JSSApplet object includes the JSSAppletShadow shadow object. Siebel Open UI exposes this shadow object to scripting. When Siebel Open UI prepares to display the applet, SWE determines whether or not a browser script is defined for this applet. If this script exists, then Siebel Open UI downloads the browser script file that contains the definition of the shadow object from the Siebel Server to the client.
For example, assume you write a browser script for an applet to handle the PreInvokeMethod event. At run-time, Siebel Open UI creates a JavaScript object that it derives from the JSSAppletShadow object. It runs the PreInvokeMethod event and the event handler of the shadow object before it calls the DoInvokeMethod event. Each shadow object includes a reference to the underlying object. The shadow object sends the call to this underlying object, if necessary. For more information about deriving values, see "Deriving Presentation Models, Physical Renderers and Plug-in Wrappers".
Siebel Open UI creates an application shadow object with the following application object during application startup:
Application InvokeMethod ...................... bRet = this.*FirePreInvokeMethod*(methodName, inputPS); ;return from here if the return value of the PreInvokeMethod is CancelOperation ; continue to invokemethod if the return value is ContinueOperation ...................... this.DoInvokeMethod (methodName, args); this.*FireInvokeMethod*(methodName, inputPS);
Siebel Open UI does the following to create a shadow object for an applet, business component, or business service:
Siebel Server. Siebel Open UI creates the ObjInfo (SWE_PROP_SHADOW) shadow when it encounters an object that includes a custom script that you write. The server gets the class name and the file name of the shadow from the SRF. It packages the class name and file name into the SWE_PROP_SHADOW, and then sends it to client.
Client. Siebel Open UI gets the class name and the file name from SWE_PROP_SHADOW, loads the script file, creates the shadow object with the retrieved class name, and then stores the shadow pointer in the applet object or the business component object.
The process is the same for a business service except Siebel Open UI uses the SWE_PST_SERVICE_SHADOWS shadow.
Siebel Open UI does the following to create a shadow object for a control:
Siebel Server. Siebel Open UI creates the ObjInfo (SWE_PROP_SHADOW) shadow object if it encounters a control that includes a script that you write. It gets the event name of the control from the SRF. It packages event names into the SWE_PST_SCRIPTS shadow, and then sends it to client.
Client. Siebel Open UI gets the list of control events from the SWE_PST_SCRIPTS shadow, and then calls these methods from the corresponding predefined methods.
You can use the following object types in browser script:
Application
Applet
Control
Business object
Business component
Business service property
Table B-16 describes the event handlers that you can use in browser script to handle a predefined event for a Siebel object type.
Table B-16 Event Handlers You Can Use in Browser Script for a Siebel Object Type
Object Type | Event Handler |
---|---|
Application |
You can use the following event handlers:
|
You can use the following event handlers:
|
|
Business component |
You can use the following event handler:
|
Business service |
You can use the following event handlers:
|
Table B-17 describes the event handlers that you can use in browser script to handle a predefined DOM event for a Siebel control object type.
Table B-17 DOM Event Handlers You Can Use in Browser Script for a Siebel Object Type
Object Type | Event Handler |
---|---|
Control in a high-interactivity client. |
You can use the following event handlers:
|
Control in a standard interactivity client. |
You can use the following event handlers:
|
Table B-18 describes the methods that you can use in a browser script for each Siebel object type that Oracle's Siebel Open UI can use.
Table B-18 Methods You Can Use in Browser Script for Each Siebel Object Type
Object Type | Method |
---|---|
Applet |
You can use the following methods:
|
Application |
You can use the following methods:
|
Business Component |
You can use the following methods: |
Business Object |
You can use the following methods:
|
Business Service |
You can use the following methods:
|
Control |
You can use the following methods:
|
Property Set |
You can use the following methods:
|