Reputation: 6909
I have two regions on the page with the same title, so I cannot use APEX hide region dynamic action and forced to use javascript.
Both regions are part of Region display selector.
I gave each region different static ID - Region`` and
Region2`.
I am hiding a second region and displaying the first one using javascript dynamic action:
$("#Region2").hide();
$("#Region1").show();
The thing is, both regions are still accessible via Region Display Selector. How can I hide one of the regions from the display selector?
Upvotes: 1
Views: 3825
Reputation: 2165
I would try these options in that order:
1 - Put these regions inside a "container" region, this container region is "blank with attributes". You need to control this container region in the selector and not the two childs.
2 - This control, show or not show, can not be done as a server-side condition?
3 - Define a static id of these regions and use hide() or show() to do this. And you can access your respective tab like this. Example:
//alfa4 is the static ID of my region report
$("li[aria-controls='SR_alfa4']").hide()
$("li[aria-controls='SR_alfa4']").show()
You can test in this page: https://apex.oracle.com/pls/apex/f?p=145797:12
Upvotes: 1