You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alex Shneyderman <a....@gmail.com> on 2006/10/02 11:03:19 UTC

Calling an action from the view (from JSP)

I have a view that has a few different losely related subviews. I have
actions that can generate each subview independently. I also have a
view where few of those little subviews are bunched together. And
sometimes, I would need to display several sub-views while displaying
the form to edit data for one of the subviews. When submitting such a
form I would not want to make submission process depend on the fact
that my next view has other subviews that might as well be change.

What would be a way to deal with this in Struts?

I am basically looking for a way to do what ww:action tag does in
WebWork, for those familiar with WW.

-- 
Thanks,
Alex.

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


Re: Calling an action from the view (from JSP)

Posted by Antonio Petrelli <ap...@apache.org>.
Alex Shneyderman ha scritto:
> I have a view that has a few different losely related subviews.

It seems that's a job for Tiles:
http://struts.apache.org/1.x/struts-tiles/index.html (for Struts-Tiles)
http://struts.apache.org/struts-sandbox/tiles/index.html (for Tiles 2)

> I have actions that can generate each subview independently. I also 
> have a
> view where few of those little subviews are bunched together. And
> sometimes, I would need to display several sub-views while displaying
> the form to edit data for one of the subviews. When submitting such a
> form I would not want to make submission process depend on the fact
> that my next view has other subviews that might as well be change.

It can be done with Tiles, but instead of using JSP pages, use actions 
that forward to the correct JSP page depending on the logic you want.

HTH
Antonio

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