You need to sign in to do that
Don't have an account?

reRender and rendered attribute in visualforce
i write a visualforce page with source code
<apex:page controller="MyController1"> <apex:form> <apex:pageBlock > <apex:pageBlockSection id="search"> <apex:commandLink action="{!commandLinkAction}" value="Advance Search" reRender="thePanel" id="theCommandLink"/> <apex:outputPanel id="thePanelWrapper"> <apex:outputPanel id="thePanel" rendered="{! rend}" layout="block">My div</apex:outputPanel> </apex:outputPanel> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
and the MyController1 class is
public class MyController1{ public Boolean rend{get;set;} public PageReference commandLinkAction(){ rend=true; return null; } }
when i click on Advanced Search link nothing happens but i was expecting outputPanel with id "thePanel" should render.why it is not rendering please someone explain??
I changed your code. check the code and see, are there your requirement?
If you got the answer from this post, Please hit the Kudos button & mark the answer as solution, It might help others running to into similar problem in future.
thePanelWrapper
rerender should always be to an outputpanel with NO rendered on it