| Author |
Exception when using JSF backing bean property as integer
|
Maya Pillai
Ranch Hand
Joined: Jul 17, 2008
Posts: 60
|
|
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
Joined: Jun 01, 2010
Posts: 618
|
|
|
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
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14561
|
|
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.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: Exception when using JSF backing bean property as integer
|
|
|