• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with value attribute of inputText

 
Dorothy Taylor
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

Kindly help me in fixing this issue. I have a jsp with the following tag in it:

<h:inputText id="employees" value="#{myBean.totalEmployees}">
<f:validateDoubleRange minimum="1" />

The field, totalEmployees, is of type 'int' in the bean, 'myBean.java'.
The problem is that by default there is always a 0 (zero) shown in the textbox in the jsp. I want the textfield to be empty by default when the page is shown. Can someone pl. suggest how i can solve this issue

Thanks in advance
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The field, totalEmployees, is of type 'int' in the bean, 'myBean.java'.

You don't want to replace it with the Integer wrapper class ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic