You need to sign in to do that
Don't have an account?
Damien_
rerender not working correctly
I have a super simple page and a button with a rerender property. All it should be doing is rerendering 2 different panels. For some reason this rerender never happens, but I had put debugs in ensuring that my method does get called. Any ideas?
Page
<apex:page controller="CohortTest2" sidebar="false"> <apex:form > <apex:outputPanel id="pnl1" rendered="{!showMe}"> <apex:outputText value="dum dum dum" /> </apex:outputPanel> <apex:outputPanel id="pnl2" rendered="{!!showMe}"> <apex:outputText value="blah blah blah" /> </apex:outputPanel> <apex:commandButton value="button" action="{!test}" rerender="pnl1, pnl2" /> </apex:form> </apex:page>
Controller:
public with sharing class CohortTest2 { public boolean showMe{get;set;} public CohortTest2() { showMe = false; } public void test() { showMe = !showMe; //return new PageReference('/apex/Cohort_SetupWizard2'); //return null; } }
Try these changes
Adding to previous reply. You cannot use rerender and rendered attributes for same component.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
All Answers
You have to rerender the parent:
Try these changes
Adding to previous reply. You cannot use rerender and rendered attributes for same component.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Wow, perfect chamil. Thank you. I can't believe I've been developing all this time and never known that simple thing..