Skip to main content
A N (Vmem) 提问于 #Apex
Hello

I have a VF page making use of a controller. I have an inputcheckbox which has associated action support and calls willcallRMA function.

The function is defined in the apex class as follows.

This code is supposed to render the section opOSGN if the chkbox is checked and not render if chkbox is unchecked.

i created tihs code in a separate vf page and it works. it doesnt work here where i added it to existing vf page.

does anyone see any issue here. please let me know.

<apex:pageblockSectionItem helpText="Select will call chkbox for will call rma's">

              

                  <apex:outputlabel value="Will Call Chkbox"></apex:outputlabel>

                  <apex:inputcheckbox label="will call" value="{!willcall}"  >

                    <apex:actionSupport event="onclick" rerender="opOSGN,req,reqan,reqan1,op1"  action="{!willcallRMA}"/>

                  </apex:inputcheckbox> 

               

              </apex:pageblockSectionItem>

              <apex:pageblockSectionItem >

              

                  <apex:outputlabel value=" "></apex:outputlabel>

                  <apex:outputlabel value=" "></apex:outputlabel>

               

              </apex:pageblockSectionItem> 

              

              <apex:pageblockSectionItem >

                    <apex:outputpanel id="opOSGN">

                        <apex:outputlabel value="Defer Until Date OSGN"  rendered="{!willcallValue}"/>

                    </apex:outputpanel>

              </apex:pageblockSectionItem>

              =================

                public PageReference willcallRMA(){

       

        if(willcall)

        {

            

            willcallValue = true;

            system.debug('Here willcallvalue is true');

        }

        else

        {

            willcallValue = false;

            rma.Defer_Until__c=null;

            rma.Local_Time_for_Deferral__c='--None--';

            system.debug('here willcallvalue is false');

        } 

        return null;

    }

    

              
10 个回答
  1. 2017年7月24日 21:09
    If you can send me the whole VF page, i can better assist. I used the same code block you mentioned above, and it works for me.
0/9000