title: JSF Number Validation
body: <p>Is there any inbuilt number validator tag in JSF that checks whether an input entered in <code>h:inputext</code> field is a number?</p>
  
  <p>The first question was answered. Edited to explain the next problem:</p>
  
  <pre><code>&lt;h:inputText id="maxrecs" value="#{simpleBean.numRecords}" required="false" maxlength="4" &gt;                         
      &lt;f:convertNumber longOnly="true"/&gt;
  &lt;/h:inputText&gt;
  </code></pre>
  
  <p>Backing Bean</p>
  
  <pre><code>private long numRecords = null;
  </code></pre>
  
  <p>If I use String or Integer object in the backing bean , value is not being set. Now when I use primitive int, 0 is being printed on the screen. I would like the screen to be empty. </p>