I am working with with picklist. Here I have to show a pageblocksection on change picklist but when I change the picklist it rerenders all the page and I am able to see pageblocksection but my picklist option get vanish from the page. Below is my code please check!
<span id="idSpan" style = "display:none">
<apex:pageBlockSection title="Search For Public Group" columns="1" id="Details">
<apex:selectList size="1" value="{!selectedgrpId}">
<apex:selectOptions value="{!GroupNames}"/>
<apex:actionSupport event="onchange" />
</apex:selectList>
</apex:pageBlockSection>
</span>
I have to show below pageblocksection.
<apex:pageBlockSection title="Enter User Id" columns="1" id="sec1" rendered="{!selectedgrpId != null}">
<apex:inputTextArea value="{!UserId}"/>
<apex:commandButton value="Submit" action="{!useraddition}"/>
</apex:pageBlockSection>
Best Answer
You have two problems here:
rendered
attributte of it's children. Try something like this: