You need to sign in to do that
Don't have an account?
dkraun
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.
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.
not sure why this is not working as you expect.