+ Start a Discussion
Jacob W LandisJacob W Landis 

Why rerender not working for the new record?

Hi,

I have a visualforce page code below. Basically a checkbox and a input text, by click checkbox, show inputtext, uncheck it, not show input text. It works perfectly fine when edit a record. But when I create a new record, it isn't working. Any ideas?
         
               <apex:outputPanel id="otherPrograms">  
                     {!OSFS_Grad_Student_Supplement__c.Other__c}       
                        <apex:pageBlockSectionItem >
                            <apex:inputcheckbox value="{!OSFS_Grad_Student_Supplement__c.Other__c   }" id="Other">
                                <apex:actionSupport event="onchange" rerender="otherPrograms" />
                            </apex:inputcheckbox>
                            <apex:outputLabel value="Other (List Program:)" for="Other"/>
                        </apex:pageBlockSectionItem>
                       
                        <apex:pageBlockSectionItem >
                            <apex:InputField value="{!OSFS_Grad_Student_Supplement__c.Other_Programs__c}"  rendered="{!OSFS_Grad_Student_Supplement__c.Other__c}" />
                        </apex:pageBlockSectionItem>
       
                    </apex:outputPanel>
Jacob W LandisJacob W Landis
Just found out , if I put some value in the required field, and then the rerender part (required field is not in the rerender section) works  for the record creation page as well.  seems like before you put any required field value, the none-required value is not set from page to the controller. very wearid. Anybody know why is that?