Chrome issue with Open UI Form Applets

Recent versions of Chrome are problematic for Siebel Open UI. Form applets can be affected, which use a depreciated method of specifying the height of a table as an attribute of the table tag instead of line styles. But for now, we need to deal with it. Chrome seems to de-support the legacy of Siebel applets ūüôā

This is reproducible with Siebel Vanilla in Chrome only in 8.2.2.1, 8.2.2.2, 8.2.2.3 and latest release of 8.2.2.4. IE8, IE9, IE10 and Firefox all appears to render correctly.

chrome

Oracle development supplied the detail which which can be easily implemented as part of a post loader. Likely this will be a temporary solution, when Oracle development will factor out the legacy applets in a future fix pack or innovation pack.

<code>if (typeof(SiebelAppFacade.ChromeSpaceFix) == "undefined") {
	Namespace('SiebelAppFacade.ChromeSpaceFix');
	(function () {
		SiebelApp.EventManager.addListner("postload", ChromeTdSpaceFix, this);
		function ChromeTdSpaceFix() {
			try {
				$("#_svf0 table.GridBack").find("tr").children("td").each(function (index) {
					var regex = /(height)(\s*):(\s*)([^;]*)/,
					el = $(this),
					st = el.attr("style"),
					match = regex.exec(st);
					if (match && Number(match[4]) &&
						el.is(":empty") && el.siblings().length != el.siblings(":empty").length) {
						st = st.replace("height", "xheight");
						el.attr("style", st + "height:" + Number(match[4]) + "px;");
					}
				});
			} catch (error) {
				// Nothing to do.
			}
		}
	}
	());
}
</code>

Displaying the Siebel Server name you’re connected to in Open UI

The practice many of us had in the HI-past is to configure the “Application Title” parameter on the object manager level, to display or include a reference to the Siebel Server. This enables one in a multi-server environment to know in case of trouble which server the user was connected to, just by looking at the screen. Well, Open UI changes the game a bit. The “Application Title” is not longer used, and the document.title of the application is populated in a dynamic way. That is, Siebel will display the view name and record-context information instead of the static Application Title.

Well, overriding this standard behavior would not be the best idea, probably.

So I thought of an alternative, and with the hint of Oracle’s Duncan Ford I realized the following simple solution (see the read text “Connected to DEMOHOST”).

siebelserverhost

How was this done?

1) Create a small generic BS to get a System Variable using the Clib.getenv method ():

bscode

2) Created a System Preference “SiebelHostEnvVar”. This would contain e.g. “COMPUTERNAME”:


syspref

3) Created two new fields in the Personalization Profile buscomp to load the SiebelHostEnvVar into a Profile Attribute. The beauty of this buscomp which is not broadly known, is that it loads while logging into an object manager session. At which time Profile Attributes are created, alike the Field name in the buscomp. Typically these are Employee/User related. If you can join from S_PARTY, you can set Employee related data as profile attributes. But also calculated fields are possible, which are used here. 

pers

 
<code><span style="font-family:Georgia, serif;">4) Created custom post loader (http://jsfiddle.net/wSsSk/): </span>
<pre>if (typeof (SiebelAppFacade.Postload) == "undefined") {
 Namespace('SiebelAppFacade.Postload');
if (typeof (SiebelAppFacade.Postload) == "undefined") {
    Namespace('SiebelAppFacade.Postload');

    (function(){
        SiebelApp.EventManager.addListner( "postload", OnPostload, this );
        function OnPostload( ){
            try
            {
                console.log("Loaded custom postload to display server name in MsgLayer");

                var sSiebelServerHost = SiebelApp.S_App.GetProfileAttr("SiebelServerHost");

                if (sSiebelServerHost.length == 0)
                    sSiebelServerHost = "COULD NOT RETRIEVE SIEBEL SERVER HOST";

                console.log("Retrieved servername: " + sSiebelServerHost);

                if ($(".siebelServerHost").length==0)
                    $("#MsgLayer").after($("&lt;div&gt;").addClass("siebelServerHost"));

                $(".siebelServerHost").html("Connected to " + sSiebelServerHost);
            }
            catch(error)
            {
                // silent catch 
            }
        }
    }());
}</pre></code>

5) And some CSS to make it visually attractive:

 
<code><pre>.siebelServerHost {
 float: left;
 position: relative;
 top: 5px;
 margin-left: 10px;
 margin-top: 7px;
 font-weight: bold;
 padding-top: 0px;
 padding-right: 10px;
 display: block;
 color: red;
 font-size: 0.8em;
 }</pre></code>

Voil√°, done.