function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MWelch_WTMWelch_WT 

PageBlockSection "collapsible" not working all the time

On some VF pages I build, the collapsible functionality of a pageBlockSection doesn't work.  Looking in to it, I find that the js code with the twisty functions (stuff like twistsection() and the like) is not inserted on these failing pages.

 

It generally happens on my more complex VF pages, with nested pageblock elements.  Is this a known bug, and are there things I can do to avoid it?

OhngOhng

Hi

 

The page behaviour seems to happen with:

 

<apex:pageBlock mode="edit" >

 

If you have either:

 

<apex:pageBlock mode="detail" >

 

or:

 

<apex:pageBlock >

 

then

 

1) There are separators between the rows of fields and;

2) the page sections can be collapsible.

 

I hope this helps.

 

Paul

Basil Dobek 6Basil Dobek 6
Old post but for posterity, this post fixed the issue: http://salesforce.stackexchange.com/questions/11513/apexpageblocksectionitem-collaspe-or-expand-throws-twistsection-is-not-defined 

Basically, add this code below your page block: <apex:pageBlockSection title="PBSectionHack" rendered="false"></apex:pageBlockSection>