Bookshelf Home | Contents | Index | PDF |
Configuring Siebel Open UI > Post-Upgrade Configuration Tasks > Overriding Plug-In Wrappers > About Presentation Model-Injected APIs in Plug-in WrappersThis topic includes information about presentation model-injected APIs in plug-in wrappers. You can use the APIs in this topic to achieve the customized functionality you were using previously in renderers. The code examples for each of the methods in this topic can be used as references about achieving the same or similar customizations in Siebel Innovation Pack 2014. For more information about plug-in wrappers, examples of configuration and further information about APIs, see Architecture of Siebel Open UI Example of Customizing Siebel Open UI and Application Programming Interface. While the following APIs have been described earlier in this documentation in the context of use within the physical renderer to act as liaisons with the plug-in wrapper, they are also available for use from within the plug-in wrapper:
In addition to the APIs listed here, the framework injects certain presentation model-level APIs into all plug-in wrappers to ease the layering of calls that a plug-in wrapper is required to complete. This makes programming in customized plug-in wrappers very similar to programming customized physical renderers. These types of APIs are described in the following topics: This API gets the value of a PM property where the control is deployed. This API allows the plug-in wrapper set a property on the PM on which this control is operating. They are PM properties that the plug-in wrapper is acting on. The following example shows how a CustomPW can operate on a PM property, and how another CustomPW can subsequently use the property for other purposes: CustomPW1.prototype.ShowUI = function (control) { if (this.Get("ShowControl1") === true) { SiebelAppFacade.CustomPW1.superclass.BindEvents.call(this); this.SetProperty("ShowControl2", false); CustomPW2.prototype.ShowUI = function (control) { if (this.Get("ShowControl2") === true) { SiebelAppFacade.CustomPW2.superclass.BindEvents.call(this); This API is similar to the ExecuteMethod in the presentation model: it allows the plug-in wrapper to execute a method on the PM on which it is operating. This API runs the event handler call up to the presentation model and subsequently any custom event handlers that may be attached to the event. The following example shows the usage of APIs in a custom event handler on a custom plug-in wrapper. It depicts a method that is executed on the presentation model, the return value determines if the event should be handled or ignored: // This is a custom click handler for my control. shouldHonorClick = self.ExecuteMethod("CustomPMMethod"); self.OnControlEvent("customClickEvent", self.control, self.dataset); This API is used to obtain helper objects from the plug-in wrapper. Currently only the EventHelper object is present. Any control level custom binding should happen using this helper object. The following example binds two events on to the control in the customized wrapper, and runs custom handlers defined in the wrapper: CustomPW.prototype.BindEvents = function (control) { evHelper = this.Helper("EventHelper"); .Manage(ele, "click", { ctx: this }, OnClick) .Manage(ele.next("span"), "hover", { ctx: this }, OpenAlertBox); // Custom Definition for element click here // Custom Definition for element next span hover here For a detailed example about using APIs in a customized wrapper, see Configuring the Manifest for the Color Box Example. |
Configuring Siebel Open UI | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |