You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Luis Gervaso <lu...@gmail.com> on 2005/07/27 13:30:35 UTC

DispathAction Chain

I need to call a DispatchAction inside other action
problem:

¿How can i set the appropiate parameter inside the first action?

ex:

i am inside insert() of PeopleAction and i need to call findAll() of 
WomenDispatchAction

in other words: i need req.setParameter("method","findAll"); (but this 
method isn't available in servlet api)

regards

-- 
Un saludo

Re: DispathAction Chain

Posted by Ed Griebel <ed...@gmail.com>.
Hello Luis-

I would recommend to break out the logic in
WomenDispatchAction.findAll() into a "helper object" (or call it
business object, DAO, etc.), then call the method from both actions.
If you've played around with actions calling actions, you can see that
getting everything populated correctly for the call is a pain.

Good luck,
-ed

On 7/27/05, Luis Gervaso <lu...@gmail.com> wrote:
> I need to call a DispatchAction inside other action
> problem:
> 
> ¿How can i set the appropiate parameter inside the first action?
> 
> ex:
> 
> i am inside insert() of PeopleAction and i need to call findAll() of
> WomenDispatchAction
> 
> in other words: i need req.setParameter("method","findAll"); (but this
> method isn't available in servlet api)
> 
> regards
> 
> --
> Un saludo
> 
>

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