title: salesforce apex refresh VF pageblock section
body: <p>I am trying to refresh a page block section based on the value of a select list. Here is the VF:</p>
  
  <pre><code>&lt;apex:pageblockSectionItem &gt;                
                      &lt;apex:selectList size="1" value="{!reasonCode}"&gt;
                          &lt;apex:selectOptions value="{!reasonCodes}"/&gt;
                          &lt;apex:actionSupport event="onchange" reRender="a"/&gt;
                          &lt;apex:actionSupport event="oncomplete" action="{!isAcceptedReasonCode}" reRender="orders"/&gt;
                      &lt;/apex:selectList&gt;                
                  &lt;/apex:pageblockSectionItem&gt;
              &lt;/apex:pageBlockSection&gt;
  
  &lt;apex:pageBlockSection id="orders" rendered="{!isAcceptedRC==true}" &gt;
                  &lt;apex:outputLabel value="Order Number" for="odNum"/&gt;
                  &lt;apex:inputText id="odNum" value="{!OrderNumber}"/&gt;
              &lt;/apex:pageBlockSection&gt;
  </code></pre>
  
  <p>I have tried a bunch of different events, but none seem to work. Here is the isAcceptedReasonCode function:</p>
  
  <pre><code>public PageReference isAcceptedReasonCode (){
          if(reasonCode == 'Accepted Offer') {
              isAcceptedRC = true;       
          }else {
              isAcceptedRC = false;
          }   
          return null;
      }
  </code></pre>
  
  <p>This seems pretty straightforward but it doesn't seem to work... of course i change the select list to be = 'Accepted Offer'</p>