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”).
How was this done?
1) Create a small generic BS to get a System Variable using the Clib.getenv method ():
2) Created a System Preference “SiebelHostEnvVar”. This would contain e.g. “COMPUTERNAME”:
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.
<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($("<div>").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.



