1

I have a Boolean value in my controller.

public  Boolean withoutDocument {get;set;}

I have referred them in the visual force page like this.

<input type ="radio" value="{!withoutDocument}"/>

when I try to get the value in my controller.

It is throwing the Run time error that the argument cannot be null.

Here is my full VF page Code

    <apex:page controller="PCAppoinmentEmail" sidebar="false">

  <apex:form >
    <apex:pageMessages />
    <apex:inputHidden id="SampleRefersh" value="{!Counts}"/>

    <apex:pageBlock title="Search Appointment">

      <apex:actionStatus startText="requesting..." id="myStatus"/>
      <apex:actionStatus startText="sending..." id="mymail"/>
       <apex:pageBlockSection title="Period" collapsible="false" columns="2"  >
       <apex:pageBlockSectionItem >
           <apex:panelGroup ><div style="padding-top:5px;"><apex:outputLabel style="font:bold 11px Arial" for="eventfromDate">Appointment From Date</apex:outputLabel></div></apex:panelGroup>
           <apex:panelGroup >
               <div style="width:125px;">
                     <div style="float:left;width:99px;" > 
                          <input type="Text" name="eventfromDate" class="smltxt" onfocus="fillTodate()" onkeydown="return false;" id="eventfromDate" value="{!defaultdate}"/>        

                     </div>
                     <div style="float:right;width:16px;margin-top:5px;"> 
                          <input type="button" value="" class="dtpicker" style="border:0px" onClick="displayDatePicker('eventfromDate');" /> 
                     </div>
                </div>
           </apex:panelGroup>
       </apex:pageBlockSectionItem>
       <apex:pageBlockSectionItem >
           <apex:panelGroup ><div style="padding-top:5px;"><apex:outputLabel style="font:bold 11px Arial" for="eventtoDate">Appointment To Date</apex:outputLabel></div></apex:panelGroup>
           <apex:panelgrid >
               <div style="width:125px;">
                     <div style="float:left;width:99px;"> 
                          <input type="Text" name="eventtoDate" onkeydown="return false;" class="smltxt" id="eventtoDate" value="{!defaultdate}"/>                                         
                     </div>
                     <div style="float:right;width:16px;margin-top:5px;"> 
                          <input type="button" value="" class="dtpicker" style="border:0px" onClick="displayDatePicker('eventtoDate');" /> 
                     </div>
                </div>
           </apex:panelgrid>
       </apex:pageBlockSectionItem>           
       </apex:pageBlockSection>

      <apex:pageBlockSection columns="6" title="Branchwise Appointment Sending" collapsible="true"  >

        <table cellpadding="1" cellspacing="0" border="0" width="100%" align="center">
              <tr>

                  <td style="width:150px;">&nbsp;</td>
                  <td align="right" valign="middle" style="padding-right:10px;">

                      <div style="padding-top:5px;">
                           <apex:selectList value="{!BranchId}" id="Branch" size="1" onchange="BranchDetails()" styleClass="lrgdrpdwn" multiselect="false">
            <apex:selectOptions value="{!BranchItems}"/>
                </apex:selectList>
                      </div>
                  </td>
                  <td align="left" valign="middle">

                      <div style="padding-top:5px;">
                           <input type="button" title="Send Appointment Sheet"  alt="Send Appointment Sheet" style="background:url({!$Resource.sndapmtsheet});background-repeat:no-repeat;width:174px;height:20px;border:0px;cursor:pointer;" value=""  onClick="SendEmails();" />
                      </div>
                  </td>
                  <td align="left" valign="middle">

                      <div style="padding-top:5px;">
                          <!-- <input type="button" title="Sales Reps without Appointment"  alt="Sales Reps without Appointment" style="background:url({!$Resource.salesrepswithoutapp});background-repeat:no-repeat;width:231px;height:20px;border:0px;cursor:pointer;" value=""  onClick="EmptySendEmails();" />-->
                      </div>
                  </td>
                </tr>
                </table>


     </apex:pageBlockSection>

     <apex:pageBlockSection title="SalesRepwise Appointment Sending"  collapsible="true" columns="1"> 
     <apex:pageBlockSectionItem >
         <apex:outputLabel style="font:bold 11px Arial" value="Rep Name" for="contact"/>
          <apex:panelGroup >
          <apex:selectList value="{!RepId}" id="contact" size="1" styleClass="lrgdrpdwn" multiselect="false">
              <apex:selectOptions value="{!Items}"/>
         </apex:selectList>&nbsp;&nbsp;
          </apex:panelGroup>
     </apex:pageBlockSectionItem>
     <apex:pageBlockSectionItem >
         <apex:outputLabel style="font:bold 11px Arial" for="eventtoDate">Alternate Emails</apex:outputLabel>
         <apex:panelGroup >
         <textarea id="alterEmails" type="text" class="smltxtarea" style="width:190px;height:56px;" /><br/>



         </apex:panelGroup>


     </apex:pageBlockSectionItem>
      <br/>
       Click here to send sheet without attaching the Document:   <input type ="radio" value="{!withoutDocument}"/> 
        <div style="width:360px;">
            <input type="button" title="Show Appointment Sheet" alt="Show Appointment Sheet" style="background:url({!$Resource.showappsht});background-repeat:no-repeat;width:175px;height:20px;border:0px;cursor:pointer;" value=""  onClick="showSheet('1');" />&nbsp;&nbsp;
            <input type="button" title="Send Appointment Sheet" alt="Send Appointment Sheet" style="background:url({!$Resource.sndapmtsheet});background-repeat:no-repeat;width:174px;height:20px;border:0px;cursor:pointer;" value=""  onClick="showSheet('2');" /> 
        </div>

   </apex:pageBlockSection>



    </apex:pageBlock>

    <apex:pageBlock title="Appointment Sheet" id="Sheet" > 
     <div style="padding:5px;float:right;text-align:right;">
         <input type="button" value="" alt="Print" title="Print" onclick="tablePrint();" style="{!displayPrint};background:url({!$Resource.printer_btn});background-repeat:no-repeat;width:27px;height:25px;border:0px;cursor:pointer;"/>  
     </div>
    <div style="clear:both"></div>
 <DIV id="tbl_display" style="text-align:left;" width="100%" >  
    <apex:repeat value="{!lstclsDisplay}" var="p"> 
<table border="0" cellpadding="0" cellspacing="0" width="100%" >
    <tr>
        <td valign="top" align="center" style="height:965px">
            <table width="100%" border="0" cellspacing="1" cellpadding="0" style="border:1px solid #1797C0;">
  <tr>
    <td align="center" valign="middle" style="background-color:#1797C0; color:#fff; padding:5px; font:bold 12px Verdana, Arial, Helvetica, sans-serif">APPOINTMENT TIME SHEET</td>
  </tr>

  <tr>
    <td align="left" valign="middle" style="padding:5px;font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Rep Name:&nbsp;&nbsp;<span style="font:bold italic 11px Verdana, Arial, Helvetica, sans-serif;color:#1679b1">{!p.RepName}</span></td>
  </tr>
  <tr>
    <td align="left" valign="middle" style="padding:5px;font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Appointment Date &amp; Time:&nbsp;&nbsp;<span style="font:bold italic 14px Verdana, Arial, Helvetica, sans-serif;color:#1679b1">{!p.appdate} : {!p.Times}</span></td>
  </tr>
  <tr>
    <td align="left" valign="middle" style="padding:5px;font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Appointment Comments:&nbsp;&nbsp;<span style="font:bold italic 11px Verdana, Arial, Helvetica, sans-serif;color:#1679b1">{!p.Description}</span></td>
  </tr>


  <tr>
    <td align="left" valign="top">
    <table width="99%" border="0" cellspacing="1" cellpadding="0" style="border:1px solid #CCCCCC" align="center">
      <tr style="background:#D7F1FA">
        <td width="75%" style="padding:5px; font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Account Details</td>
        <td width="25%" style="padding:5px; font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Mobility Information</td>
        </tr>
      <tr>

        <td style="background:#F0F0F0;font:11px Verdana, Arial, Helvetica, sans-serif;padding:2px;" align="left" valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="3">
         <tr>
            <td width="20%" align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">First Name</td>
            <td width="1%">:</td>
            <td width="29%" align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.Fname}</td>
            <td width="20%" align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">MID</td>
            <td width="1%">:</td>
            <td width="29%"  align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.MID}</td>
          </tr>
          <tr>
            <td align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Last Name</td>
            <td>:</td>
            <td align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.Lname}</td>
            <td width="20%" align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">UID</td>
            <td width="1%">:</td>
            <td width="29%"  align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.UID}</td>
          </tr>
          <tr>
            <td align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Primary Phone</td>
            <td>:</td>
            <td align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.Phone}</td>
            <td align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Product Interest</td>
            <td>:</td>
            <td align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.ProductIntrest}</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Property</td>
            <td>:</td>
            <td align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.Property}</td>
            <td width="20%" align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Adv Name 1</td>
            <td width="1%">:</td>
            <td width="29%"  align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.Ad1name}</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Property Type</td>
            <td>:</td>
            <td align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.PropertyType}</td>
            <td width="20%" align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Adv Name 2</td>
            <td width="1%">:</td>
            <td width="29%"  align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.Ad2name}</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td align="left" valign="top" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Address</td>
            <td>:</td>
            <td align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.Addresss}</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Appointment Status</td>
            <td>:</td>
            <td align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.AppointmentStatus}</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
           <tr>
            <td align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Scheduling Promotion</td>
            <td>:</td>
            <td align="left" valign="middle" style="font:11px Verdana, Arial, Helvetica, sans-serif;">{!p.SchedulingPromotion}</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
        </td>
            <td style="background:#F0F0F0;font:11px Verdana, Arial, Helvetica, sans-serif;padding:5px;" align="left" valign="top">{!p.Mobility}</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table width="99%" border="0" cellspacing="1" cellpadding="0" style="border:1px solid #CCCCCC" align="center">
      <tr style="background:#D7F1FA">

        <td colspan="5" align="left" valign="middle" style="padding:5px; font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Additional Information</td>
        </tr>
      <tr>
        <td width="19%" align="left" valign="middle" style="background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">Martial Status</td>
        <td width="21%" align="left" valign="middle" style="background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">Contact 1</td>
        <td width="21%" align="left" valign="middle" style="background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">Contact 1 DOB</td>
        <td width="20%" align="left" valign="middle" style="background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">Contact 2</td>

        <td width="19%" align="left" valign="middle" style="background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">Contact 2 DOB</td>
      </tr>
      <tr>
        <td align="left" valign="middle" style="background:#fdfbfb;font:11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">{!p.MStatus}</td>
        <td align="left" valign="middle" style="background:#fdfbfb;font:11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">{!p.C1}</td>
        <td align="left" valign="middle" style="background:#fdfbfb;font:11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">{!p.C1DOB}</td>
        <td align="left" valign="middle" style="background:#fdfbfb;font:11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">{!p.C2}</td>

        <td align="left" valign="middle" style="background:#fdfbfb;font:11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">{!p.C2DOB}</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>

    <td ><table width="99%" border="0" cellspacing="1" cellpadding="0" style="border:1px solid #CCCCCC" align="center"> 

      <tr>
        <td colspan="2" align="center" valign="middle" style="background:#ededed;color:#000;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">Tax information updated on - 08/24/2015</td>
        <td width="18%" align="center" valign="middle" style="background:#D7F1FA;color:#000;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">State</td>
        <td width="17%" align="center" valign="middle" style="background:#D7F1FA;color:#000;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">County</td>
        <td width="17%" align="center" valign="middle" style="background:#D7F1FA;color:#000;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">City</td>
        <td width="16%" align="center" valign="middle" style="background:#D7F1FA;color:#000;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">Other</td>

      </tr>
      <tr>
        <td width="17%" align="left" valign="middle" style="background:#ededed;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">&nbsp;</td>
        <td width="15%" align="left" valign="middle" style="background:#ededed;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">&nbsp;</td>
        <td align="center" valign="middle" style="text-transform:uppercase;background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">{!p.StateName}</td>
        <td align="center" valign="middle" style="text-transform:uppercase;background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">{!p.CountryName}</td>
        <td align="center" valign="middle" style="text-transform:uppercase;background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">{!p.CityName}</td>
        <td align="center" valign="middle" style="text-transform:uppercase;background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">{!p.Others}</td>
      </tr>
      <tr>
        <td align="left" valign="middle" style="background:#ededed;color:#000;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">Total Tax</td>
        <td align="center" valign="middle" style="background:#ededed;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">
         <apex:outputText value="{0, number, 0.00}">
           <apex:param value="{!p.TotalTax}" />
         </apex:outputText>{!if(p.IsTaxAvail,'%','')}
        </td>
        <td align="center" valign="middle" style="background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">
         <apex:outputText value="{0, number, 0.00}">
           <apex:param value="{!p.Stax}" />
         </apex:outputText>{!if(p.IsTaxAvail,'%','')}
        </td>
        <td align="center" valign="middle" style="background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">
         <apex:outputText value="{0, number, 0.00}">
           <apex:param value="{!p.CoTax}" />
         </apex:outputText>{!if(p.IsTaxAvail,'%','')}
        </td>
        <td align="center" valign="middle" style="background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">
         <apex:outputText value="{0, number, 0.00}">
           <apex:param value="{!p.Ctax}" />
         </apex:outputText>{!if(p.IsTaxAvail,'%','')}
        </td>
        <td align="center" valign="middle" style="background:#F0F0F0;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;"> 
        <apex:outputText value="{0, number, 0.00}">
           <apex:param value="{!p.Otherstax}" />
         </apex:outputText>{!if(p.IsTaxAvail,'%','')}</td>
      </tr>


      <tr>
        <td align="left" valign="middle" style="background:#ededed;color:#000;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">
          <table width="100%" border="0" cellspacing="0" cellpadding="0 ">
            <tr>
              <td width="81%" align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Supply</td>

              <td width="19%" align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">{!p.SupplyInstall}</td>
            </tr>
          </table></td>
        <td align="center" valign="middle" style="background:#ededed;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">
         <apex:outputText value="{0, number, 0.00}">
           <apex:param value="{!p.SupplyResult}" />
         </apex:outputText>{!if(p.IsTaxAvail,'%','')}
        </td>
        <td colspan="4"  align="left" valign="middle" style="background:#F0F0F0;color:#1679b1;font:12px Verdana, Arial, Helvetica, sans-serif;padding:5px;"><i>{!p.Comment1}</i></td>
        </tr>
      <tr>
        <td align="left" valign="middle" style="background:#ededed;color:#000;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;">
            <table width="100%" border="0" cellspacing="0" cellpadding="0 ">
                <tr>
                  <td width="81%" align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">Install</td>
                  <td width="19%" align="left" valign="middle" style="font:bold 11px Verdana, Arial, Helvetica, sans-serif;">{!p.TaxType}</td>
                </tr>
            </table>
        </td>
        <td align="center" valign="middle" style="background:#ededed;color:#666;font:bold 11px Verdana, Arial, Helvetica, sans-serif;padding:5px;"> <apex:outputText value="{0, number, 0.00}">
           <apex:param value="{!p.InstallResult}" />
         </apex:outputText>{!if(p.IsTaxAvail,'%','')}</td>
        <td colspan="4"  align="left" valign="middle" style="background:#F0F0F0;color:#1679b1;font:12px Verdana, Arial, Helvetica, sans-serif;padding:5px;"><i>{!p.Comment2}</i></td>
        </tr>      
    </table></td>
  </tr>

  <tr>
    <td style="height:3px;"></td>
  </tr>
</table>
        </td>
    </tr>
</table>

 </apex:repeat>
  </DIV> 
  </apex:pageBlock>

    <script language="javascript" type="text/javascript">

    var branchID="j_id0:j_id4:j_id31:j_id49:Branch";
    var contactID="j_id0:j_id4:j_id31:j_id53:j_id54:contact";

    function tablePrint(){  
       var display_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";  
    display_setting+="scrollbars=yes,width=750, height=600, left=100, top=25";
    var content_innerhtml = document.getElementById("tbl_display").innerHTML;  
    var document_print=window.open("","",display_setting);  
    document_print.document.write('<html><head><title>print using javascript </title></head>');  
    document_print.document.write('<body style="font-family:verdana; font-size:12px;" >');  
    document_print.document.write(content_innerhtml);  
    document_print.document.write('</body></html>');  
    document_print.document.open(); 
    document_print.print();  
   // setTimeout('window.close()', 10);
    document_print.document.close();  

    }  

    function EmptySendEmails(){
        var value=document.getElementById(branchID).value;
        if(value=='--Select Branch--'){
            alert('Please Select Branch');
        }else{
            for(i=0;i<document.getElementById("j_id0:j_id4:SampleRefersh").value;i++){
                EmptySendBranchMail(
                    document.getElementById("eventfromDate").value,
                    document.getElementById("eventtoDate").value,
                    document.getElementById(branchID).value
                )
            }
            document.getElementById(branchID).selectedIndex=0;
        }

    }

    function SendEmails(){
        var value=document.getElementById(branchID).value;
        if(value=='--Select Branch--'){
            alert('Please Select Branch');
        }else{
            for(i=0;i<document.getElementById("j_id0:j_id4:SampleRefersh").value;i++){
                SendBranchMail(
                    document.getElementById("eventfromDate").value,
                    document.getElementById("eventtoDate").value,
                    document.getElementById(branchID).value,
                    i
                )
            }
            document.getElementById(branchID).selectedIndex=0;
        }

    }
    function BranchDetails(){
        var value=document.getElementById(branchID).value;
        if(value!='--Select Branch--'){
            CollectDetails(
                document.getElementById(branchID).value
            )
        }
    } 

    function showSheet(optionsC){

       if(optionsC=="1"){
           if(dateDifference()){
            Show(
                 document.getElementById("eventfromDate").value,
                 document.getElementById("eventtoDate").value,
                 document.getElementById(contactID).value

            )}else{
                return false;
            }


        }else{

            Send(
                 document.getElementById("eventfromDate").value,
                 document.getElementById("eventtoDate").value,
                 document.getElementById(contactID).value,
                 document.getElementById("alterEmails").value
            )   
        }
    }
     var DateDiff = {
            inDays: function(d1, d2) {
                var t2 = d2.getTime();
                var t1 = d1.getTime();
                return parseInt((t2-t1)/(24*3600*1000));
            }
        }

        function dateDifference()
        {
            var stdate=new Date(document.getElementById("eventfromDate").value);
            var enddate=new Date(document.getElementById("eventtoDate").value);

            if(DateDiff.inDays(stdate, enddate)>5)
            {
                alert('Please Select only 5 days!');
                return false
            }
            else
            {
                return true;
            }
        }
        function fillTodate(){
            document.getElementById('eventtoDate').value=document.getElementById('eventfromDate').value;
        }
    </script>   
    <apex:outputLabel id="salp"></apex:outputLabel>
    <apex:actionFunction name="EmptySendBranchMail" action="{!EmptyBranchMail}" immediate="true" reRender="salp"  status="mymail">
        <apex:param name="fDate" value=""/>
        <apex:param name="tDate" value=""/>
        <apex:param name="Actid" value=""/>
    </apex:actionFunction>
    <apex:actionFunction name="SendBranchMail" action="{!SendBranchEmail}" immediate="true" reRender="salp"  status="mymail">
        <apex:param name="fDate" value=""/>
        <apex:param name="tDate" value=""/>
        <apex:param name="Actid" value=""/>
        <apex:param name="loopcnt" value=""/>
    </apex:actionFunction>
    <apex:actionFunction name="Show" action="{!GenerateSheet}" immediate="true" reRender="Sheet"  status="myStatus">
        <apex:param name="fDate" value=""/>
        <apex:param name="tDate" value=""/>
        <apex:param name="RepId" value=""/>
    </apex:actionFunction>
     <apex:actionFunction name="Send" action="{!SendMail}" immediate="true" reRender="Sheet" status="mymail">
        <apex:param name="fDate" value=""/>
        <apex:param name="tDate" value=""/>
        <apex:param name="RepId" value=""/>
        <apex:param name="alterEmails" value=""/>
    </apex:actionFunction>
    <apex:actionFunction name="CollectDetails" action="{!AccountContactDetails}"  reRender="SampleRefersh"  status="myStatus">
        <apex:param name="BranchID" value=""/>
    </apex:actionFunction>
  </apex:form>

</apex:page>
2
  • 1
    So much irrelevant content...
    – Adrian Larson
    Commented Mar 15, 2016 at 11:57
  • @prasanthcheenu - By way of SFSE etiquette, posting so much code turns off many reviewers to not want to help. You'll find that reducing the scope of your problem to its essence will a) sometimes lead you to self-cure and, if that doesn't work, b) get much more assistance.
    – cropredy
    Commented Mar 16, 2016 at 2:03

1 Answer 1

0

You should define a default value of the withoutDocument variable (initialize it) in the constructor:

public with sharing YourClass{
    public Boolean withoutDocument { get; set; }

    // Here goes the constructor
    public YourClass(){

        // Initializing the variable 
        withoutDocument = false;
    }
}
7
  • Hi MastOr, After declaring the default value as false, When I try to get value passed from page. I'm getting this default value irrespective of the value given in page.
    – prasanth
    Commented Mar 15, 2016 at 8:48
  • @prasanthcheenu It is not possible. I think you have a bug in the visualforce markup (some redundant actionRegions or similar). You better post more visualforce code to your question. Commented Mar 15, 2016 at 8:51
  • <input type ="radio" value="{!withoutDocument}"/> I have given like this in my VF page
    – prasanth
    Commented Mar 15, 2016 at 8:59
  • 1
    @prasanthcheenu It will not work with a native HTML input elements. You should use apex:selectRadio tags to get selected variable value into controller. Commented Mar 15, 2016 at 9:07
  • I want a boolean value either true of false .
    – prasanth
    Commented Mar 15, 2016 at 9:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .