You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matthias Kerkhoff <ma...@BESToffers.de> on 2000/10/23 11:42:15 UTC
Re[2]: Problem with optional form fields
> Couldn't you use a variable of type java.lang.Integer instead of an int? That
> way, the default value for the property would be null, and not 0.
That's exactly what I did. Sorry if I missed to make it clear. I used an
Integer in my modified example, that defaults to <null> (ie. non-existant)
in the corresponding SubscriptionForm and Subscription classes.
I suspect that the problem is caused from BeanProperties.convert<Type>,
that converts a null Integer to new Integer(0) behind the scenes. I have
not finally understand when this method get's called (maybe somewhere from
copyProperties?)
--
Matthias (mailto:make@BESToffers.de)