You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eduardo PĂ©rez Ureta <ed...@gmail.com> on 2008/07/10 23:14:41 UTC

[S1] Options from database for a view use case. Recommended way?

I have a list of items in DB:
ITEMS contain rows ID and NAME

I would like to know what is the recommended way to have a form that
lets the user select an option from the database list of items and when
the uses clicks the preview action the selected item is shown prior to
the last action of confirmation.

Should I get the list of items from the form?
(setting it in the form does not make sense to me as a form is just for
user input and that list is not user input)
Or from the action? (request.setAttribute())
(setting them from the action associates that list with a view and I am
only supposed to let the controller know what to do next not what view to
display)
Or from any other place?

Could someone show me the recommended way on how to do it showing me the
Form(s), Actions and struts-config.xml?

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