function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Viktor IliukhinViktor Iliukhin 

apex:inputText integert null to 0

Hi gays
I have apex class
public class inputIntegerCtrl {
     public Integer intValue { get; set; }
     ......
}
and visual page
<apex:page controller="inputIntegerCtrl">
   <apex:inputText label="value" value="{!intValue}" />
...
</apex:page>

When I try to set "null" (empty) in apex:inputText, I get value "0" instead of "null". How set "null" value ?
 
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi Viktor,
Can you explain in detail about what are you trying to do ,because i tried the same code in my org .I am able to get input text box with empty value in it.
<apex:page controller="inputIntegerCtrl">
    <apex:form>
   <apex:inputText label="value" value="{!intValue}" />
	</apex:form>
</apex:page>

public class inputIntegerCtrl {
     public Integer intValue { get; set; }
}

Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.

Thanks and Regards