Skip to Main Content

Collapsible Regions

When you look for methods to collapse/expand a collapsible region (e.g. using a button), you find all sorts of suggestions.
Almost none of those seem to work (anymore) however - the only one I got to work properly was suggested by John Snyders on Apex 20.1 - Expand/Collapse All Regions with DA question.

See the example below. I used IDs instead of "find" in the jQuery selector, but the idea is the same.

Collapsible Region

Now you see me...

Using with Codemirror

When you use a collapsible region that contains Codemirror html, this may not work well.
If the default status of the region is Collapsed, the Codemirror javascript will not update the region once it is expanded, leaving parts of it blank.
Maybe a forced refresh of the region after expansion would fix this, but that is not a very elegant solution of course.
This is probably an issue with similar javascript/html combinations as well.

Code

Dynamic Action

Identification
Name
Execution Options
Sequence
When
Event
Selection Type
Button
Advanced
Event Scope
True Action
Identification
Action
Settings
Code
Execution Options
Sequence
Fire On Initialization

Dynamic Action

Identification
Name
Execution Options
Sequence
When
Event
Selection Type
Button
Advanced
Event Scope
True Action
Identification
Action
Settings
Code
Execution Options
Sequence
Fire On Initialization

Region

Identification
Sequence
Title
Type
Source
Source Type
Region Source
Attributes
Static ID