This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Can't enter 0 in textfield for Float Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Can Watch "Can New topic
Author

Can't enter 0 in textfield for Float

chris gar
Ranch Hand

Joined: Jul 20, 2002
Posts: 45
I have the following field in a jsp


I have the field defined in an action with getters and setters (not shown)


I can successfully enter any number. I can also enter nothing (leaving the field blank) - and it works fine . Why can't I just enter 0 or 0.0 ?

Suggestions?

Thanks in advance.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What version? I vaguely remember a bug about this.
chris gar
Ranch Hand

Joined: Jul 20, 2002
Posts: 45
Struts 2.1.6.

I believe this is the current version.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't enter 0 in textfield for Float
 
Similar Threads
2D Array removing Duplicates
Input continuously collecting
List of Lists
Regarding maximum length a user can enter.
Validation Struts2