I can create an html form and associate a bean with it (i.e. <html:form
name="Bean" type="com.package.Bean">).  When I do this, I am happy to see
all of my form fields populated with values that they retrieve from the
getters in the bean.  However, when I update those values, it appears that
I have to retrieve them from the request object and then place them into
the bean (i.e. it isn't done automatically as it would be if I were to use
a struts form bean).
So, I guess my question is simply: is there any way for this bean to be
updated automatically?  If the answer is no, then I'm assuming the only way
to do this is to create a "form-bean", prepopulate it with the values from
my bean, display it, and then take the changed values from the form-bean
and set them into my model bean.  The thing that seems odd about that is
the two beans look almost identical - they have the same setters and
getters.  It seems a little redundant to make a "form-bean" for every
"model-bean" that you want to represent through the use of a form.

Reply via email to