Hello All,

I have encountered a problem using Validator Dynamic Forms:
Developing function is very frequent to load the initial state of FormBean
with data that come from Data Trasfer Object (Value Object pattern) of EJB
Entity Bean.
To do this task i have found a method on the utility class BeanUtils that
copy all properties with the same name from a source to a destination bean,
each of these can be static or dynamic. Another feature of this method is to
compute all necessary typecasts for properties, that is very useful between
Data Trasfer Object (where attribute are strictly typed) and FormBeans
(where attribute are frequently String to contain also incorrect data before
and after validation).
When using istruction BeanUtils.copyProperties(DTO, FormBean), i catch an
InvocationTargetException when the source object contain attribute with null
values.
To avoid this feature i need to write and mantain code like this on each
Action and for each attribute :

myDynamicFormBean.set("attribute1", myValueObject.getAttribute1() ==
null? "": myValueObject.getAttribute1().toString());

instead of a unique call to BeanUtils.copyProperties().

Why this DynaForms cannot accept null values for their properties??? I have
an old version?

I'm a new struts developer and i don't have a complete framework knowledge,
but i don't comprise a reason that can't permit null values for properties
of DynaForms... Can i expect this feature in future?please let me know.

Thanks
Franco




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to