This is a valid way to do it. To be more specific, your Action would ask
some delegate for the domain object, then it would use that object as
either a scoped (request, session, etc.) attribute or as a field for
your form-bean (if you are indeed using your form-bean for "setup"
actions as well as for POST-processing actions -- some do this, some
don't, but it sounds like you are; when I do this, I use the "name"
attribute in my ActionMapping (but with validate = false) so that Struts
will go ahead and instantiate the form-bean for me, and pass it to the
execute method).
Erik
Jonathan M Z wrote:
suppose I am using a form-bean to populate an html
form, I need to retrieve the values of this form-bean
from persistent storage. Do I do this from the Action
that eventually forwards to this jsp page?
Should I create the form-bean from persistent storage
in action.execute(), then forwards the view to the jsp
page?
for example if the form-bean's name is aBean, in
action.execute I create the aBean, populate it, and
then set it as an attribute into the request(or
whatever scope I see fit)
is this a standard approach for reading data into
form-bean from the persistent data layer?
thanks
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]