Getting ActionSupport to Rerender Elements on a Page

Up until today I have been struggling with getting the apex:actionSupport tag to work as documented. Apparently, it looks like VisualForce is extremely picky about what it will rerender. I found this great post on the developer boards that resolved my issue.

What it came down to was making sure that the elements being rerendered did not have a rendered=”” attribute in the tag. For example, in the code below I wanted to hide the second picklist if the value of the first picklist was ‘Standard’. I kept trying to rerender the pageBlockSectionItem area and it wouldn’t work. By wrapping the pageBlockSectionItem block inside of another tag (pageBlockSection in this case) and then rerendering that ID in the actionSupport tag. I tried wrapping it in an outputPanel tag, but that screws up the formatting of the labels and fields. The same was true for the customConfigurationPanel area. I wrapped that pageBlock in an outputPanel tag and made sure the rendered attribute was on the pageBlock not the outputPanel tag. Works great.

<apex:pageBlock id="MainConfigurationBlock" title="Standard Integration Options" 
<apex:pageBlockSection id="configTypeSection" columns="1">
   <apex:pageBlockSectionItem >
      <apex:outputLabel>Integration Type</apex:outputLabel>
      <apex:selectList value="{!config.IntegrationType__c}" size="1">
         <apex:selectOption itemValue="Standard" itemLabel="Standard"/>
         <apex:selectOption itemValue="Custom" itemLabel="Custom"/>
         <apex:actionSupport event="onchange" status="StatusChange"
          rerender="activityObjectSection,customConfigurationPanel" />

<apex:pageBlockSection id="activityObjectSection" columns="1">
   <apex:pageBlockSectionItem rendered="{!config.IntegrationType__c = 'Custom'}">
      <apex:outputLabel id="activityObjectLabel">Activity Object</apex:outputLabel>
      <apex:selectList id="activityObjectField" value="{!config.ActivityObject__c}" size="1" 
      rendered="{!config.IntegrationType__c = 'Custom'}" >
         <apex:selectOptions value="{!objects}"/>

<apex:actionStatus startText="Updating page ..." id="StatusChange"/>

<apex:outputPanel id="customConfigurationPanel">
   <apex:pageBlock id="customConfigurationBlock" title="Custom Integration Options" 
   rendered="{!config.IntegrationType__c='Custom' && config.ActivityObject__c != null}">

    ..... other fields that I don't want displayed  ....
    ..... if the IntegrationType is "Standard"      ....

</apex:outputPanel id="customConfigurationPanel">