Siebel Open UI annoying message on popup close

We recently upgraded to Patchset 11 as it promised improvement in performance up to 35% (in some areas) along with other things but after upgrading we encountered a really weird functionality (seems like a bug). After applying the patch if you try to close any popup using “X” button then you get another popup saying

“Click OK to discard unsaved data and close all popups.”

image

This happens for all popups (MVG, Pick Applet, About View .. you name it). This is really annoying as it doesn’t seem to serve any purpose and our client also expressed the same sentiment. In addition, this message is hard coded in JS files which means in multilingual environment even Non-English application will show the message in English.

I can only assume that Oracle was working on some functionality and left this code by mistake.  Our Client asked this functionality to be removed as it was more of an annoyance than useful. My initial thought was to open an Oracle SR but due to my prior experiences of not getting answers I decided to give a try myself first. It wasn’t difficult to find the answer

A quick string search in the scripts folder with message text revealed that message was coming from “phyrenderer.js” and after un-minifying the code I found the following piece of code responsible for it.

b.prototype.BindEvents = function() {
      SiebelAppFacade.PopupRenderer.superclass.BindEvents.call(this);
      var k = $("[name=popup]");
      k.data("context", this);
      k.dialog({
         beforeClose: function(m, n) {
           if ($(m.currentTarget, "[class*=ui-dialog-titlebar-close]").length > 0) {
               var l = $("[name=popup]").data("context");
               if (g.Confirm("Click OK to discard unsaved data and close all popups.")) {
                   l.GetPM().OnControlEvent("ClosePopupByX", m);
                   return true;
               }
           return false;
          }
      }
    });
};

When compared with code in earlier patches the same event had following code

b.prototype.BindEvents = function() {
   SiebelAppFacade.PopupRenderer.superclass.BindEvents.call(this);
   var k = this.GetPM();
   if (SiebelApp.S_App.IsMobileApplication() === "false") {
      $("[class*=ui-dialog-titlebar-close]").bind("click", function(l) {
         k.OnControlEvent("ClosePopupByX", l)
      })
   }
};

So, in order to remove this confirm message all you have to do is change the code to following:

b.prototype.BindEvents = function() {
   SiebelAppFacade.PopupRenderer.superclass.BindEvents.call(this);
   var k = $("[name=popup]");
   k.data("context", this);
   k.dialog({
      beforeClose: function(m, n) {
      if ($(m.currentTarget, "[class*=ui-dialog-titlebar-close]").length > 0) {
         var l = $("[name=popup]").data("context");
         //if (g.Confirm("Click OK to discard unsaved data and close all popups.")) {
             l.GetPM().OnControlEvent("ClosePopupByX", m);
             return true;
         //}
      //return false
      }
   }
})
};

I have tested and it doesn’t seem to effect anything else but remember this is a core file that we are not suppose to touch so you are responsible for any damage it might cause in your environment. Also you will have to make this change again after applying future patches if oracle doesn’t remove this code itself. I hope this will save somebody few hours of headache.

This Post has been viewed : 11,438 Times


2 Responses to Siebel Open UI annoying message on popup close

  1. For IP15 Patchset 8 comment these line in phyrenderer.js

    //if(j.Confirm(SiebelApp.S_App.LocaleObject.GetLocalString(“IDS_SWE_POPUP_CLOSEBYX_WARNING”)))
    //{
    $(“[name=popup]”).data(“context”).GetPM().OnControlEvent(“ClosePopupByX”,o);return true
    //}return false

    Thanks.

Leave a Reply

Contribute