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
Joe Zuqing LiJoe Zuqing Li 

rerender scope issue

Hi everyone, I have one issue related to the rerender attribute, could you please kindly help take a look if any resolution, many thansk in advance.

Issue Details:
I have one visualforce page A in which contains a component B and this component also has included another component C in it. in Page A, I also have a footer component in which it will call out once during page loads. while in Component C, I have one link, by which if clicked, it should render the Panel(id=feedbackContainer) in Component C self. however for now, I notice that when I click the link in Component C, it caused the whole Page A refreshed and rendered, which results in the call out triggered and system popup error saying "You have uncommitted work pending. Please commit or rollback before calling out", I suspect this is all because the rerender attr in Component has wrongly rendered its scope, it should render only the section to the id specified, but actually it refreshed the whole Parent page.

Particial Source Code shown as below:
----------------------------------------------------------------------------------------------------------------------
Visualforce Page A:
<!--Article Detail-->
        <apex:outputPanel rendered="{!viewingArticle}">
        <div class="l-wrapper">
          <div class="contentBox">
            <c:pkb_search pkbCon="{!pkbCon}" />
            <c:pkb_topicpath pkbCon="{!pkbCon}" isUQ="true"/>
            <c:pkb_articleview pkbCon="{!pkbCon}" showFeedbackYesNo="true" showBackLinks="true" />
          </div>
          <div class="globalNavi">
            <c:pkb_narrow pkbCon="{!pkbCon}" isGlobalNavi="true"/>
          </div>
        </div>
        </apex:outputPanel>
         <div id="footer">
           <c:pkb_footer pkbCon="{!pkbCon}"/>   <!-- in this component, there is one call out fucntion once the page loaded-->
         </div>
         .....
----------------------------------------------------------------------------------------------------------------------
Component B:
   ...
  <apex:outputPanel layout="block" styleClass="feedbackContainer" rendered="{!showFeedbackYesNo}">
    <c:pkb_feedbackyesno pkbCon="{!pkbCon}" />  <!--  include Component C here-->
  </apex:outputPanel>
  ...
----------------------------------------------------------------------------------------------------------------------
Component C:
...
<apex:outputPanel id="feedbackContainer">
<section class="section">
  <apex:form id="feedbackYesNoForm">
  <apex:actionFunction name="submitFeedback" action="{!pkbCon.recordArticleFeedback}" rerender="feedbackContainer" status="feedbackStatus" />
<!--1. Feedback Yes/No form-->
  <apex:outputText rendered="{!NOT(pkbCon.feedbackRecorded)}">
  <h3 class="question-title">{!$Label.PKB2_Was_Helpful}</h3>
<div id="feedback" class="question-select l-content-inner clearfix">        
        <div class="question-select-y">
          <apex:commandLink id="question-yes" styleclass="btncust btn-white btn-question" value="Yes" action="{!pkbCon.deferred}" rerender="feedbackContainer" status="feedbackYesNoStatus"/>
        </div>
        <div class="question-select-n">
          <a href="#" id="question-no" class="btncust btn-white btn-question">No</a>
        </div>

    <apex:actionStatus id="feedbackYesNoStatus">
      <apex:facet name="start"><apex:image value="{!$Resource.pkb_loadingdots}" /></apex:facet>
      <apex:facet name="stop"></apex:facet>
    </apex:actionStatus>
</div>
...
----------------------------------------------------------------------------------------------------------------------
Controller
...
    public void deferred() {
      createDeferral(true);
      feedbackRecorded = true;
        system.debug('*****************deferred'+feedbackRecorded);
    }
...
----------------------------------------------------------------------------------------------------------------------

is there any part in my code that caused this issue, kindly please help figure it out. I just cannot make it through.
It would be of greate help. Many thanks in advance.