Skip to Main Content


Apex 20.1 - Expand/Collapse All Regions with DA question

JeanYves BernierOct 15 2020 — edited Oct 15 2020

Hi all,
In my application I have a region with some collapsible sub-region
My customer want to have a button to Expand/Collapse All Regions
So I created a button to expand all en another to collapse all in the master region.
I found the code searching on the internet.
DA on my button "EXPAND_ALL_REGIONS"
event : click
true action : execute javascript code

$('#TYPMACH.a-Collapsible .a-Collapsible-content').show();
$('#TOURS.a-Collapsible .a-Collapsible-content').show();
$('#TRAVPTR.a-Collapsible .a-Collapsible-content').show();
$('#TRAVPTR.a-Collapsible .a-Collapsible-content').show();

where TYPMACH and TOURS are the Id's of my collapsible regions
This is doing the trick except that the regions still ha
ve the attribute aria-expande="false" so when the user wants to re-collapse one region by its own button he have to click two times.

<button class="t-Button t-Button--icon t-Button--hideShow" type="button" aria-labelledby="a_Collapsible1_TYPMACH_heading" aria-controls="a_Collapsible1_TYPMACH_content" aria-expanded="false"><span class="a-Icon a-Collapsible-icon" aria-hidden="true"></span></button>

I found another option to do that on the internet which states to do it with this code :

$('#TYPMACH button .t-Button--hideShow[aria-expanded="true"]').click();

But this option doesn't work for me but work for the example found on the web
article used to implement my solution
APEX5 UT remote control for collapsible regions (0 Bytes)
example app "" Login: guest/information
Any help appreciated
Note : it's really painful to post a thread in this new forum !!! it takes so much time...pasting code is also quite difficult (did not found a syntax option) and you are always clicking on "save draft" being afraid to lost all you have typed before..
Really not a success for me, and waiting for major improvements by Oracle.

This post has been answered by Gabriel Guzman on Oct 17 2020
Jump to Answer
Post Details
Added on Oct 15 2020