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
VacharaVachara 

Rendering page block section issue.

Hi,

 

I’m having issues rendering a page block. 

 

Here’s the setup: I have two page blocks.  As shown below, the two page block ID’s are “ReturnInfo” and “RequestQA”.  In the first page block “ReturnInfo”, a field called “{!eRMA__c.Request_QA_Details_Boolean__c}” conditionally gets set to either “true” or “false” in the controller.  When this field “{!eRMA__c.Request_QA_Details_Boolean__c}” gets set to “true”, the content of the second page block “RequestQA” is supposed to appear, but this is not happening.  I have already verified that the ““{!eRMA__c.Request_QA_Details_Boolean__c}” does indeed change to the appropriate value (true or false), but it seems like the new value is not getting to the second page block (“RequestQA”).  If I rendered the entire  VF page, this works fine, but it’s more efficient to render the second page block directly.  Please let me know what you think why this is not working?  Thanks.

 

<!--#### Return Information Section Start ##-->  

            <apex:pageBlockSection title="Step 4. Return Information" id="ReturnInfo" columns="2"> 

                <apex:pageBlockSectionItem >       

                                …

                                …

                                …

                <apex:pageBlockSectionItem id="specificRC">       

                    <apex:outputtext >Specific Reason Code </apex:outputtext>

                    <apex:outputtext >

                        <apex:outputPanel styleClass="requiredInput" layout="block">

                        <apex:outputPanel styleClass="requiredBlock" layout="block"/>                   

                            <apex:selectList value="{!eRMA__c.Specific_Reason_Code__c}" size="1" >

                                <apex:selectOptions value="{!returnSpecificRCList}" rendered="true"/>

                                <apex:actionSupport event="onchange" action="{!getReturnRequestAdditionInfo}" reRender="ReturnInfo,RequestQA" />

                                <apex:inputHidden value="{!eRMA__c.Request_QA_Details_Boolean__c}"/>

                            </apex:selectList>                    

                        </apex:outputPanel>

                    </apex:outputtext>                                     

                </apex:pageBlockSectionItem>              

 

                                …

                                …

                                …

 

<!--#### Request QA Section Start ##-->

          <apex:pageBlockSection showHeader="false"color: rgb(255, 192, 0);">RequestQA" columns="2" rendered="{!eRMA__c.Request_QA_Details_Boolean__c}">

 

                                …

                                …

                                …

 

Best,

Ta

Best Answer chosen by Admin (Salesforce Developers) 
WesNolte__cWesNolte__c

Hey

 

Wrap them pageblocksections in outputPanels, and move the Ids to those elements.

 

Wes

All Answers

WesNolte__cWesNolte__c

Hey

 

Wrap them pageblocksections in outputPanels, and move the Ids to those elements.

 

Wes

This was selected as the best answer
VacharaVachara

Hi Weznolte,

 

Thank you for pointing me in the right direction.  I was able to resolve my issue.  I wrapped the two page block sections w/ one outputPanel, and just rendered this outputPanel.  Thank you again.

 

Best,

Ta