We're aware of the bug and I have been working with Drew Davidson (Ognl
guy) on getting this fixed. I expect it to happen very soon. Thanks for
hanging in there!

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Francisco Hernandez
Sent: Wednesday, October 08, 2003 2:59 AM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] TypeConverter - exception for Long values when
g iven empty string

excellent! thanks!

BOGAERT Mathias wrote:

> Replace your ParametersInterceptor by this one.
> 
> Cheers,
> Mathias
> 
> -----Original Message-----
> From: Francisco Hernandez [mailto:[EMAIL PROTECTED] 
> Sent: woensdag 8 oktober 2003 11:28
> To: [EMAIL PROTECTED]
> Subject: Re: [OS-webwork] TypeConverter - exception for Long values
when
> given empty string
> 
> 
> anyone happen to know of a workaround or patch for this problem?
> 
> Cameron Braid wrote:
> 
>>I am getting an exception from the params interceptor.
>> 
>>I have an action with a setId(Long), and a hidden form field called id
>>that initially has an empty string value.
>> 
>>This used to work, until the exception handeling was improved with the
>>type converters.  Now, I get this error :
>> 
>> id - [Invalid field value for field "id".]
>> 
>>which is because of  java.lang.NumberFormatException: For input 
>>string: "" in XWorkBasicConverter.super.convertValue(context, value, 
>>toType); at line 85.
>> 
>>I can see a couple of soloutions
>> 
>>a) in my forms, don't render the hidden input if there is no value for
>>id (fair bit of work)
>>b) create a custom type converter for Long (and other numeric types) 
>>that convert empty string to null (fairly easy)
>>c) modify the XWorkBasicConverter to support the empty string to null 
>>conversion for Number types.  (every one can use this)
>> 
>>What are your thoughts ?
>> 
>>Cameron
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
_______________________________________________
> Opensymphony-webwork mailing list
[EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to