Configuring Siebel Open UI > Reference Information for Siebel Open UI > Browser Script Compatibility >

How Siebel Open UI Handles Custom Client Scripts


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.

How Siebel Open UI Creates Shadow Objects for Applications

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

How Siebel Open UI Creates Shadow Objects for Business Objects

Siebel Open UI uses a business object shadow object only in other shadow objects, such as an application shadow object, applet shadow object, or business component shadow object.

How Siebel Open UI Creates Shadow Objects for Applets, Business Components, or Business Services

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 Siebel Runtime Repository. 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.

How Siebel Open UI Creates Shadow Objects for Controls

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 Siebel Runtime Repository. 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.
Configuring Siebel Open UI Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.