function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Duncan_StewartDuncan_Stewart 

OutputPanel rerender causes full page refresh instead; new to Spring '14..?

[Also posted under same title at StackExchange - just covering my bases]
We've had a custom VF console page for some time with a commandButton that opens a new Case in edit mode once a user selects the recordtype and hits [Update].  The method called updates the workFrameURL with the appropriate parameters and the button's rerender attribute refreshes a section of the page with the new Case detail.  Unfortunately, the rerender is no longer working.

Per the StackExchange suggestion, I've added additional ids and changed the rerender from just the id of the outputPanel to the $Component.<parent>.outputPanelId, but there's been no change.  It's probably cleaner to respond directly to the StackExchange post, but to save time I'll post the code snippets here as well:

Controller method:
public void updateCaseRecordType(){
     this.displayCaseIFrame = true;
     if(this.selectedRecordType != null){
        this.workFrameURL = this.workFrameUrlRoot + '&RecordType=' + this.selectedRecordType + '&ent=Case';
     } else {
         this.workFrameURL = this.workFrameUrlRoot;
     }
   }
The VisualForce:
<apex:page showHeader="false" sidebar="false" id="tsConsolePage" title="Tech Support Console" controller="NxTechSupportConsoleController" 
	action="{!doitall}" cache="false" id="consolePage" >

     <!-- related content removed for relevance / space considerations -->   
     
     <apex:define name="workarea" >
        	<apex:actionRegion id="workArea" >
	        	<apex:outputPanel id="recordTypeSelector">
	        		<span style="font-weight:bold;font-size:1.1em;">Record Type: &nbsp;&nbsp;</span>
	        		<apex:selectList value="{!selectedRecordType}" multiselect="false" size="1">
	        			<apex:selectOption itemValue="" itemLabel="Select a Record Type:" />
	        			<apex:selectOptions value="{!caseRecordTypes}" />
	        		</apex:selectList>
	        		&nbsp;&nbsp;
	        		<apex:commandButton value="Update" action="{!updateCaseRecordType}" 
	        							rerender="{$Component.workArea.caseDisplayPanel}" />
	        		<br/>
	        	</apex:outputPanel>
	        	<apex:outputPanel id="caseDisplayPanel">
	        		<apex:outputPanel id="internalWrapper" rendered="{!displayCaseIframe}">
			            <apex:iframe width="950px" id="caseIFrame" src="{!workFrameURL}" height="4000px" ></apex:iframe>
			            <apex:outputPanel id="tempPanel" rendered="{!NOT(displayCaseIframe)}" >
			            	<br/> This section is displayed until a record type is selected for the case. <br/>
			            </apex:outputPanel>
		            </apex:outputPanel>
	            </apex:outputPanel>
            </apex:actionRegion>
        </apex:define>



ShashForceShashForce
Hi Duncan,

This could be one of those situations where you need to put your outputPanel within another outputPanel (a parent), and then rerender the parent outputPanel instead.

Please see these pages for more explanation:
https://developer.salesforce.com/forums/ForumsMain?id=906F000000097GKIAY
 http://wordgraphs.com/faq/15651/apex-outputPanel-not-rerendering
http://bobbuzzard.blogspot.in/2011/02/visualforce-re-rendering-woes.html

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank