Re: Struts converts null to 0 ?

2004-02-16 Thread Nathan Coast
internally BeanUtils uses ConvertUtils to convert from Strings to objects. You can deregister the default converters http://jakarta.apache.org/commons/beanutils/apidocs/org/apache/commons/beanutils/ConvertUtils.html The default converters are initialised as follows with 0 for most numeric def

Re: Struts converts null to 0 ?

2004-02-16 Thread Larry Meadors
Yeah, that is the joy of bean-utils. It is best to leave it a stringon the form and convert it yourself. >>> [EMAIL PROTECTED] 02/16/04 7:45 AM >>> I have a form with a Long property; I used Long instead of long to have the property nullable, but if the (html) form includes such a property, strut

Re: Struts converts null to 0 ?

2004-02-16 Thread Jim Theodoridis
I think the best way is to use the String property on the form and then convert the value to Long - Original Message - From: "Renato Romano" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Monday, February 16, 200

Struts converts null to 0 ?

2004-02-16 Thread Renato Romano
I have a form with a Long property; I used Long instead of long to have the property nullable, but if the (html) form includes such a property, struts sets the corresponding bean property to 0, even if it has no value (value=""); what I'd like is struts to leave the property at null!! It also behav