Marcio Ghiraldelli wrote:
> How? Supose I have a form with an select combo. The itens should be
> populated with a database result. The only way I could acomplish this
> is getting data on the Action before the form view, set the list in
> the request, redirect to the view. Then, the view creates an instance
> of the form, the reset is called and them it populates the data via
> the request.
>
>    How should I populate the form BEFORE Struts reaches the view, as
> doens't exists an form instance before it??

The view doesn't create an instance of the form, the Action does, and
passes it to the view.

For instance, I have often used a simple subclass of Action as a base
class for all my actions that separates the execute method into
executeGet and executePost methods. This methods might share some
functionality in a certain Action, like populating a list for a drop-down.

Dave



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

Reply via email to