I have an ActionForm (ContactForm) object in scope, and _also_ a ContactImpl
value object that pretty much mirrors the get/set methods in the
ContactForm.

I'm using the BeanUtils.copyProperties method to move the properties back
and forth, but I'm confused as to when each of the objects should have
priority.  (IOW, when to change a property in which one.)

I found myself using:
<bean:write name="contact" property="prospectId"/>

and then wondering why the property didn't have the correct value.

So... I think the rule is that in the JSP associated with the ActionForm,
you should be using the instance of the form as the "bean" for any extra
display work that must be done outside of the <html:text>, etc. tags that go
inside the <html:form> tags.

And then the Value Object is only used at the very beginning to populate the
form the first time for editing, and at the last minute before it gets sent
off to the DAO to be persisted.

Is that right?

Thanks in advance for helping me get this straight,

-- 
Wendy Smoak
http://sourceforge.net/projects/unidbtags 

Reply via email to