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 CONVERSION ERROR Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "CONVERSION ERROR" Watch "CONVERSION ERROR" New topic
Author

CONVERSION ERROR

Shruti B
Greenhorn

Joined: Jan 19, 2006
Posts: 7
I am getting a conversion error when a String in entered in case of an Integer. However with the help of a converter i have catered to it and it is giving me a proper customised error message.
But now if the user is entering a String in that input text (where an Integer is expected) and clicks on the Cancel button (Cancel button is of type Submit) since the button is of type submit, the converter get called and throws an exception.
Is there a way by which i can skip the call of the methods (which check for an integer) in the converter depending on the button click or else a way by which i can know which button is clicked so that i can handle it in the converter?

Please reply.

Thanks and Regards,
Shruti


Regards,<br />Shruti
madhuri madhuri
Ranch Hand

Joined: Jan 18, 2006
Posts: 58
Try setting the property immediate = true on the cancel button and see.


~Madhuri
Jamie Williams
Ranch Hand

Joined: Mar 31, 2006
Posts: 70
If the cancel button doesn't need to do anything with the form information, I think you could just include it in a separate form, then the other one wouldn't need to be processed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CONVERSION ERROR