Thursday 29 November 2018

Bringing back Right Click in Siebel Open UI

Hello All,

I should have written this Post 5 Years back when Open UI was launched and this functionality was depreciated.
saying its better late then never, writing this post to show how to bring back right click functionality in siebel (this was a common us in HI, but with open UI this was removed)

There are several post's for the same and have explained very clearly, i have added some important points with the feature,

1. Write a PR file.
Since we are tracking the right click event we need to have the code written in BindEvents function of PR file.

Form_Applet_RightClick.prototype.BindEvents = function() { this );
var appletFullId  = this.GetPM().Get("GetFullId");
       var appletPlaceHolder = $("#s_" + appletFullId + "_div"); var selBtnSiebMenu = "#s_at_m_" + appletFullId.match(/\d+$/); // takes the trailing digit from the FullId (e.g. "5")
       var btnSiebMenu = $(selBtnSiebMenu); // selector for the applet menu button  
       $(appletPlaceHolder).mousedown(function(e) {
         if (e.which == 3 ) {
// alert(selBtnSiebMenu);
             $(appletPlaceHolder).bind("contextmenu", function(e) {
         e.preventDefault(); // prevent the browser context menu to appear

   $(btnSiebMenu).trigger("click"); // simulate a user click        
       $(selBtnSiebMenu + "-menu").animate ({ top: e.pageY - 150 + 'px',left: e.pageX + 'px' }, 0);
                                    return false; } // end if


2. Need to Identify Default Right Click event 

$(appletPlaceHolder).mousedown(function(e) {
                            if (e.which == 3 ) .....

2. Need to disable the default right click menu

            $(appletPlaceHolder).bind("contextmenu", function(e) {
                            e.preventDefault(); // prevent the browser context menu to appear

3. Need to Place the Opened Menu next to Cursor.

$(selBtnSiebMenu + "-menu").animate({ top: e.pageY - 150 + 'px',left: e.pageX + 'px' }, 0);

4. Need to Bind it through out the Application then Single applet

for this need to make entry in Manifest Administration with Name as DEFAULT FORM APPLET and Usage Type Physical Renderer
See screen shot below,

Working Example looks like ,

Link to PR File ,

This can be extended for List Applets too.. do give it a try

No comments:

Post a Comment

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...