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
dkraundkraun 

problem with rerendering a pageBlockSection

Hi,

I'm just curious if there are known issues with rerendering a pageBlockSection.  I am dealing with a section that has inputFields like:

<apex:pageBlockSection id="contactInfoSection" title="Contact Details">
                <apex:inputField id="contactFirstName" value="{!contact.FirstName__c}"/>
                <apex:inputField id="contactLastName" value="{!contact.LastName__c}"/>
                <apex:inputField id="contactEmail" value="{!contact.Email__c}"/>
                <apex:inputField id="contactPhoneNumber" value="{!contact.PhoneNumber__c}"/>
                <apex:inputField id="contactCompany" value="{!contact.Company__c}"/>
                <apex:inputField id="contactType" value="{!contact.Type__c}"/>
</apex:pageBlockSection>

Essentially, I have functionality to let the user choose the contact to work with, which updates the contact variable in my controller and then I rerender this section.  For some reason, using rerender="contactInfoSection" does not work (in fact, it seems to erase the changes I made in my controller as far as I can tell), but if I simply change it to rerender="contactFirstName, contactLastName, ..." then everything is fine, and all of the inputFields are rerendered correctly.  This is not a big issue since there is an easy workaround, but I am very confused as to why I can't just rerender the section.
Ron HessRon Hess
i think you can wrap this in an output panel and then set the ID on that panel, that should work.

not sure why this is not working as you expect.