You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jim Theodoridis <st...@tera.gr> on 2004/02/16 15:37:28 UTC

Re: Struts converts null to 0 ?

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" <r....@set-network.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Monday, February 16, 2004 4:45 PM
Subject: Struts converts null to 0 ?


> 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 behaves so if the (html) property has non numeric value!!
> Any help is VERY appreciated
> 
> Renato
> 
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
> 
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org