[4.2] - Selector page resize options don't work on Clone

Posted by IramK on 08-Aug-2016 08:22

Hello,

I have a custom selector page that I have cloned from the original selector page and I am opening this cloned page when the user clicks on the attach button. The page is opening fine but when I provide the width and height for this custom selector page, it does not resize the window. However, if I provide the width and height for the main selector page (the original selector page), the cloned page is resized. There seems to be a bug with this. Please let me know once this is fixed.

Cheers.

Iram

All Replies

Posted by IramK on 07-Dec-2016 11:29

Hello,

Is there an update on this one?

Cheers.

Iram

Posted by Mohammed Siraj on 22-Dec-2016 01:49

Hi Iram,

For the following statement,

"I am opening this cloned page when the user clicks on the attach button",

can you please emphasize on your approach. Are you employing any client-side overrides?

Posted by IramK on 22-Dec-2016 04:06

Hello [mention:78c86023544844079dc6455a4a7a4d57:e9ed411860ed4f2ba0265705b8793d05] ,

Yes, I am trying to override the default selector page and use my custom selector page instead of it using the code below:

function onClick(e){

  window.setTimeout(function() {
    var ifrSrc = $("#dialogId > iframe").attr('src');

    var srcArr = ifrSrc.split("pageId=");
    var srcArrRest = srcArr[1].split('&')[1];

    var oppSelector =  '{!#LINK.testPage#231167}';
    var oppSelectorId = 231167;
    var newSrc = srcArr[0] + 'pageId=' + oppSelectorId + '&' + srcArrRest;

    $("#dialogId > iframe").attr('src' , newSrc);
  }, 50);
}

// This is to specify the test page selector page to open when attaching the test page record
rb.newui.util.addEventListener(rb.newui.util.customEvents.rbs_initialTabRender, function(event,eventData){

    var myButton= $($('section[name="Test Page"]').find('a')[4]);

    myButton.kendoButton({
      click: onClick
    });
});

However, once I do apply the new selector page, till selector page still thinks that this is the old selector window and applies the sizing for that page rather than the custom selector page I have created.

Posted by Mohammed Siraj on 22-Dec-2016 04:15

Only when selector pages are deduced via Roles, we will be available to fetch the correct page properties in this case page dimensions. However, as you are employing a client-side override, framework cannot identify this change and cope accordingly.

The dialog window dimensions are already decided by the time you are programmatically affecting the URL change to switch to a different Selector page variant.

This is not a Rollbase issue. Request you to file an enhancement for better support around overriding selector page options.

Posted by IramK on 22-Dec-2016 04:35

I have already added that idea a while back. Not sure if this has been considered as a part of the plan going forward.

community.progress.com/.../add_built-in_support_to_select_a_custom_selector_page

This thread is closed