You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Budi Rostiarso <Bu...@vico.co.id> on 2003/04/04 10:48:39 UTC

ActionForm-BeanUtils.copyProperties, null and default values

Hi, need help with ActionForm and BeanUtils.copyProperties.

Basically, i want my POJO properties to be null if the associated
ActionForm is empty string or null.
But using BeanUtils.copyProperties, the destination gets its properties
default values.
for example in my POJO, Float property gets a new Float with 0 value
when the ActionForm property is "", or even null.


i've already search mail-archive about my problem (struts and
commons-user), and came out with this posting right here,

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg55749.html
, but with no available solution.


Is this the default behavior of BeanUtils.copyProperties? if its so, how
can i get around this?

If you need further information, i'll be glad to provide.


Thanks in advance


Ross.



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