My VF page below
<apex:page>
<apex:form>
<apex:inputtext value="{!num}" />
<apex:commandbutton value="Save" action="{!saveFunction}"/>
</apex:form>
</apex:page>
My controller
public with sharing class cls_updateCAPAccounts {
public Integer num{get;set;}
public void saveFunction(){
System.debug('num:'+num);
}
}
When I send empty value in my inputtext, it is sent as 0. Can anyone tell me how I can pass null value from the page. It looks like it takes this 0 as default value since it is an integer but I want to send null values too.