You need to sign in to do that
Don't have an account?
augiewaz
OutputPanel not Rerendering
Hi,
I have been working on something all day where an outputPanel gets rendered on a page after a user does a search.
For some reason and I cannot work out why, a hidden outputPanel does not render after a user clicks on a commandButton.
Below is my code. I have taken things out which are not neccessary
Any help would be appreciated.
Thanks
Warren
<apex:page sidebar="false" showHeader="false" controller="SearchProjectsController"> <apex:form id="form"> <apex:commandButton value="Search Projects" action="{!searchProjects}" reRender="projectList" /> <apex:outputPanel id="projectList" rendered="{!doneSearch}"> OPEN PROJECTS </apex:outputPanel> </apex:form> </apex:page> public class SearchProjectsController { public boolean doneSearch {get; set;} public SearchProjectsController() { doneSearch = false; } public PageReference searchProjects() { doneSearch = true; projects = [SELECT Id, Name, Title__c FROM Project__c]; return null; } }
Warren,
You need to wrap your outputPanel with another one:
The rule here is that you need to rerender a container so that whatever is inside it gets rerendered.
-Shamil
All Answers
Warren,
You need to wrap your outputPanel with another one:
The rule here is that you need to rerender a container so that whatever is inside it gets rerendered.
-Shamil
If above trick didn't work, rerender form object directly, It will work
Thanks,
bForce
Thanks Shamil!!
It did the trick