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
ATSATS 

showHeader="false" prevents render of pageBlockSection

I have two pageBlockSections....one or the other renders depending on a radio button selection.  I noticed that this functionality will not work if I use showHeader="false" in my <apex:page> tag.  Any ideas?

 

<apex:page id="accttrans" standardController="Account" extensions="AccountTransfer" tabStyle="Account" sidebar="false" showHeader="false"> <apex:form id="acctForm"> <apex:pageBlock id="pb1" title="Choose" mode="edit"> <apex:pageMessages /> <apex:pageBlockSection collapsible="false" title="One or Two" id="OneOrTwo" columns="1"> <apex:selectRadio value="{!showOne}"> <apex:selectOption itemValue="true" itemLabel="One"/> <apex:selectOption itemValue="false" itemLabel="Two"/> <apex:actionSupport rerender="acctForm" event="onclick"/> </apex:selectRadio> </apex:pageBlockSection> </apex:pageBlock> <apex:pageBlock id="pb2" title="Account Information" mode="edit"> <apex:pageBlockButtons location="top"> <apex:commandButton action="{!save}" value="Update Account"/> <apex:commandButton action="{!cancel}" value="Cancel" immediate="true"/> </apex:pageBlockButtons> <apex:pageBlockSection collapsible="false" title="One Information" id="oneinfo" rendered="{!showOne}" columns="1"> <apex:outputField value="{!Account.xxx_CustomerId__c}"/> <apex:inputField value="{!Account.xxx_House_Nbr__c}"/> <apex:inputField value="{!Account.xxx_Account_Nbr__c}"/> </apex:pageBlockSection> <apex:pageBlockSection collapsible="false" title="Two Information" id="twoinfo" rendered="{!NOT(showOne)}" columns="1"> <apex:inputField value="{!Account.xx1_Site_Nbr__c}"/> <apex:inputField value="{!Account.xx1_Account_Nbr__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>

 

Best Answer chosen by Admin (Salesforce Developers) 
Richie DRichie D

Thats kinda weird. Perhaps changing your actionsupport to rerender pb2 might work?