You need to sign in to do that
Don't have an account?
rerender doesn't get the updated value of a field.
The code below rerenders the time on the "randompanel" but it doesn't shows the new value of the case status when clicking on the Reopen case button. The random panel and the NOW function were added just to test. The action {!ReOpenCase} sets the status of the case to "reopened" and this is happening but the rerender doesn't display that value. I opened a case with salesforce about this and is escalated to tier 3.....any ideas?
<apex:outputPanel id="randompanel" >
<apex:outputtext value="{!NOW()}"/>
<apex:outputtext value="{!case.status}"></apex:outputtext>
</apex:outputPanel>
<apex:form >
<apex:commandButton action="{!ReOpenCase}" value="Reopen Case" id="ReopenCaseButton" reRender="randompanel" rendered="{!IF(case.Status == 'Resolved' || case.Status == 'Closed',true,false)}"/>
</apex:form>
Thanks in advance for any help on this. I have spent a lot of time trying to make it work :(
For some reason in the past when I have run into this, nested output panels have solved the issue. Something like this
<apex:outputPanel id="OuterPanel" >
<apex:outputPanel id="randompanel" >
<apex:outputtext value="{!NOW()}"/>
<apex:outputtext value="{!case.status}"></apex:outputtext>
</apex:outputPanel>
</apex:outputPanel>
Then refresh the outer panel. I dont know why, but this has solved some of my rerendering issues in the past
Hi,
The following code works for me. You can modify your existing code based on the below one.
Below is the controller
<apex:outputPanel id="ReopenCaseButton" layout="block">
Hi, When you rerender the outputpanel "ReopenCaseButton", the rendered condition you have mention for your button get reevaluated. So based on the status you set it get reevaluated and the button displays accordingly.