• Post Reply Bookmark Topic Watch Topic
  • New Topic

h:inputText problem with integer.

 
Toto Stir
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys, i have probably very simple question. I have a simple JSF page with two input forms like this yearBorn is an int. When i start the page in the two fields there are 0 (zeros). I want them to appear blank and i don't know how to do this.

Here is my bean
http://pastebin.com/b83RPKYS
 
shivdhwaj pandey
Ranch Hand
Posts: 67
Java PHP Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear its taking default value
 
Santosh Raveendran
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Toto

Go for the Integer Wrapper class as data type for yearBorn instead of using the primitive data type int .
Integer wrapper should default to null so there may not be this issue

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!