This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes problem with value attribute of inputText Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "problem with value attribute of inputText" Watch "problem with value attribute of inputText" New topic
Author

problem with value attribute of inputText

Dorothy Taylor
Ranch Hand

Joined: Nov 26, 2007
Posts: 104
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

The field, totalEmployees, is of type 'int' in the bean, 'myBean.java'.

You don't want to replace it with the Integer wrapper class ?


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with value attribute of inputText
 
Similar Threads
Missing application web.xml, using defaults only
taglib c:out tag problem
Spring MVC problem
Regarding document object in javascript
Tomcat Database Connection Pooling Error