You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mohan Radhakrishnan <Mo...@hclcomnet.co.in> on 2002/09/28 12:42:09 UTC

Pre-populating ActionForms

Hi,
    Pre-population of ActionForms seems to be tricky. How do you populate
ActionForms and then take the user selection from them? Let's say I want to
show some HTML options. The user selects some values. The selected values
should go back into the ActionForm. Is this so difficult that I have to use
JSTL(Normal java beans) for this ? 
   The archives advise against pre-populating ActionForms because Struts has
to create them. Are there tag library examples anywhere ? Tag libraries
really make the Struts learning curve rather steep.
bye,
Mohan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Pre-populating ActionForms

Posted by David Graff <ph...@mindspring.com>.
Override the 'reset' method of the ActionForm descendant, set your initial
values in there, then (most likely) when you want to reference the page,
reference the .do that would forward you out to that page.

Hope that helps.


"Mohan Radhakrishnan" <Mo...@hclcomnet.co.in> wrote in message
news:341F8F7FCD8AD5118FD300306E06BB6503461B66@HO-MS1...
> Hi,
>     Pre-population of ActionForms seems to be tricky. How do you populate
> ActionForms and then take the user selection from them? Let's say I want
to
> show some HTML options. The user selects some values. The selected values
> should go back into the ActionForm. Is this so difficult that I have to
use
> JSTL(Normal java beans) for this ?
>    The archives advise against pre-populating ActionForms because Struts
has
> to create them. Are there tag library examples anywhere ? Tag libraries
> really make the Struts learning curve rather steep.
> bye,
> Mohan





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>