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

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?




The page behaviour seems to happen with:


<apex:pageBlock mode="edit" >


If you have either:


<apex:pageBlock mode="detail" >




<apex:pageBlock >




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

2) the page sections can be collapsible.


I hope this helps.



Basil Dobek 6Basil Dobek 6
Old post but for posterity, this post fixed the issue: 

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