2

I have action function which renders multiple ids to output panels but it is not rendering all ids.

<apex:actionFunction name="insertBreJs" action="{!insertAllApiRecords}" reRender="checkApplicantDetailsBtn,checkRuleBtn,exceptionMsgBrePanel,checkApplicantResult,errorMessage" status="status" />

 <apex:outputPanel id="checkApplicantResult">

                        <apex:outputPanel rendered="{!(errorCodeFetched!='' && errorCodeFetched!=null)}">
                         <p style="color:red;font-style: italic;">
                            <b><center>{!errorCodeFetched}</center></b>
                          </p>

                        </apex:outputPanel>
                        <!--<apex:outputPanel rendered="{!saveApplicantDetails}">-->
                         <apex:outputPanel rendered="{!isSanctionLimitZero}">
                        <p>
                            <b><center>Your loan application has been Rejected due to Zero Sanction limit.</center></b>
                            </p><br/>
                            </apex:outputPanel>

                          <apex:outputPanel rendered="{!OR(sanctionLimit!= null,sanctionLimit != '')}"> 
                        <apex:outputPanel rendered="{!NOT(isSanctionLimitZero)}">
                        <p>
                            <b><center>The Customer is {!preApprovedValue} with Sanction Limit {!sanctionLimit} </center></b>
                             </p><br/>
                            </apex:outputPanel>
                            </apex:outputPanel> 


                            <apex:outputPanel rendered="{!papqNoDataFound}">
                            <p>
                            <b><center>No Data was found for the customer.Customer is not PreApproved Customer</center></b>


                            </p>
                            </apex:outputPanel>



                        <!--</apex:outputPanel>-->





                    </apex:outputPanel>

                      <apex:outputPanel id="errorMessage"> 
                                <center>
                             <apex:outputText id="errorMsgBREs" value="{!if(errorMsgBRE!='',errorMsgBRE,'')}"
                            styleClass="error" ><br/></apex:outputText> 
                            </center>  
                      </apex:outputPanel>

The output panel with id = 'checkApplicantResult' is getting rendered but output panel with id='errorMessage' is not getting rendered. I have even verified errorMsgBRE prints message in 'checkApplicantResult' panel and its not blank.

What may be wrong here or any workaround?

  • 1
    If it doesn't render in html, then try to changing id value, for example 'apiErrorMessage'. I check with similar example and it has shown. Maybe for you, there are some conflicts with standard functionality – ytiq Jun 21 '19 at 7:58
  • I don't see anything obviously wrong. For re-rendering problems, looking at the "Network" tab of your browser's "Developer Tools" to check what is sent to the server and what comes back from the server might provide the extra information you need to solve this. – Keith C Jun 21 '19 at 8:29
1

Debuged my own issue and finally came out with solution.

It was not re-rendering because there was action function with same name written at the bottom due to which it was re-rendering the output panel id in that actionFunction. I changed the duplicate name and then it worked. :-)

<apex:actionFunction name="insertBreJs" action="{!insertAllApiRecords}" reRender="checkApplicantDetailsBtn,checkRuleBtn,exceptionMsgBrePanel,checkApplicantResult,errorMessage" status="status" />

The problem was in the name if you write 2 action function with same names system r-erenders the last action function it calls.

MY bad i did not add the other action function in the question and also it was actually not required.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.