• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception when using JSF backing bean property as integer  RSS feed

 
Maya Pillai
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting an exception (exception while getting property userAge) when using the backing bean property as Integer.....It is working fine when i change the property to String.

Backing Bean
-----------------------------
Private Integer userAge;

setter and getter

JSF
--------
<h:inputText class="txtNormal" id="userAge" value="#{nominationFormOneBean.userAge}" />

Can anyone help me to solve this.
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you need to use a JSF converter. Here's a link to a tutorial on JSF converters: http://www.laliluna.de/articles/javaserver-faces-converter-tutorial.html
 
Tim Holloway
Bartender
Posts: 18720
72
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, simple conversions in JSF EL are normally handled automatically by the BeanUtils subsystem. It would have helped to also show the source code for the propery's setter and getter method.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!