File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes ManagedBean conversion error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "ManagedBean conversion error" Watch "ManagedBean conversion error" New topic
Author

ManagedBean conversion error

Liming Xu
Greenhorn

Joined: Jan 22, 2002
Posts: 19
Hello,

I have a drop down with values from 10000 to 20000, and the dropdown value is mapped to a managedbean property which takes a float parameter.

When I tried to submit, it gives me a cast exception, java.lang.Float. What should I do?

I also have another proprety Date of birth (h:inputText) which sets to a method with "java.util.Date" parameter, seems like I get null point exception. Btw, I used teh converter for it, does it matter?

<f:convertDateTime pattern="MM-dd-yyyy" />


then submit, seems to also have problem.
Liming Xu
Greenhorn

Joined: Jan 22, 2002
Posts: 19
solved the problem by moving it from tbe .xml to a custome java file and initalizd the value to Float type directly.

date problem was fine.
 
I agree. Here's the link: http://jrebel.com/download
 
subject: ManagedBean conversion error
 
Similar Threads
How to remove managed bean from session
Re-Render Problem after ValidationException
Translating GET parameters to POST parameters. There's got to be a better way.
values from users show null when entered into database
JSR168 PortletBridge with WebLogic Portal