Wednesday, 03 May 2020
Paul Ionescu Senior Analyst CRM Consultant Autana Business Partner
With the Siebel Innovation Pack 2014 Siebel Open UI becomes more interesting, Oracle maturing its Javascript framework introducing new objects among which, in today’s post, we highlight the Plug-in Wrapper.
But what is the Plug-In Wrapper? How does it work?
Plug-In Wrapper is a new renderer-type class that controls the behavior and display of each applet-level control in the application. Oracle offers a number of standard plug-in wrappers for most types of native controls such as Text, Date, CheckBox fields etc.
Each Plug-In Wrapper is accompanied by a Plug-In Builder which is a class that makes the connection between the Plug-In Wrapper that we define and the applet control that we need to modify (it creates a layer between the physical renderer of the applet and the applet controls), through the AttachPW method.
- The AttachPW method can include the logic that allows us to control in which views or on which conditions the Plug-In Wrapper should be applied.
The format of a Plug-in Wrapper is similar to the well-known format of the Physical Renderer (PR) that most of us have been working on since the beginning of the Open UI framework at the applet level.
Here would be an example of a Plug-In Wrapper for a CheckBox control:
if (typeof (SiebelAppFacade.CheckBoxTestPW) === “undefined”)
{ SiebelJS.Namespace(“SiebelAppFacade.CheckBoxTestPW”);
define(“siebel/custom/CheckBoxTestPW”, [“siebel/pwinfra”], function () {
SiebelAppFacade.CheckBoxTestPW = (function () {
function CheckBoxTestPW(pm) { SiebelAppFacade.CheckBoxTestPW.superclass.constructor.apply(this, arguments); }
SiebelJS.Extend(CheckBoxTestPW, SiebelAppFacade.CheckBoxPW);
CheckBoxTestPW.prototype.Init = function () { SiebelAppFacade.CheckBoxTestPW.superclass.Init.apply(this, arguments); }
CheckBoxTestPW.prototype.ShowUI = function () {SiebelAppFacade.CheckBoxTestPW.superclass.ShowUI.apply(this, arguments);}
CheckBoxTestPW.prototype.EndLife = function () { SiebelAppFacade.CheckBoxTestPW.superclass.EndLife.apply(this, arguments);}
return CheckBoxTestPW; }() );
SiebelApp.S_App.PluginBuilder.AttachPW(consts.get(“SWE_CTRL_CHECKBOX”), SiebelAppFacade.CheckBoxTestPW, function (control, objName) { return true; });
return “SiebelAppFacade.CheckBoxTestPW”; }) }
What advantages would we have in using a Plug-In Wrapper?
The advantages of using Plug-In Wrapper are multiple but I would like to highlight the following:
- we could add behavior/display rules for certain fields used repetitively in different applets within the application without having to include code in each of the PR/PM of each applet, thus reducing code, improving performance and also facilitating
- Different display behaviors/rules could be defined for the same control when, for example, application usage is detected on a mobile device or touch screen.
Important! Although the Plug-In Wrapper opens up a new and wide range of possibilities, it is recommended to use CSS as much as possible according to development needs if all we need are display changes that can be easily managed through style sheets.
In the next installment we will see the methods that we can use in a Plug-In Wrapper and how to declare it in the application.

