On Saturday 28 February 2004 8:19 am, Daniel wrote:
 
> On the window I have 2 dropdown, the second depends of the first dropdown
> value, then I'll back to the class action with the first dropdown value for
> populate the second. After choice the value at second dropdown, I'll
> qualify for sending this informations to data base.
>
> How many action I need for to implement this ? I'll need one action for the
> first dropdown (at onchange event submit the form???), other action for the
> second dropdown and other for to send all informations to database ?

How many actions you need can vary. Are you using a DispatchAction? I'd 
recommend in this case. Personally, I'm not so fond of the javascript 
solutions. They do work but I just don't like them. If all of the stuff you 
are doing for these few form is related to one type of event, I'd just use 
one Action and use some dispatch actions in the Action to accomplish what you 
want.

Your description of what is going on past the first sentence is a bit vague, 
but say your action is called "MyCoolAction." It sounds like you'd need two 
repopulate dispatch actions in there:

repopulateDropdownOne
repopulateDropdownTwo 
(obviously you'd use better names).

But each of them would take care of calling the correct business class and 
returning your collection or array in order to populate the other dropdown.

Other than that, the stuff is just like your typical struts stuff. If you 
aren't using a DispatchAction then you'll need separate Action classes to 
handle each scenario (or else logic in the execute method to decided what to 
do). 

-- 
Rick Reumann

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

Reply via email to