You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Bullard, James" <JB...@AR.SONY.COM> on 2004/06/14 20:40:30 UTC
Simple struts question.
A couple tiles questions.
1.) Is there any way to have a global-forward forward to a tile, It always
tells me that such a path does not exist, meaning that rather than recognize
the page as tile def it thinks it is a page.
2.) I am using the same forms for editing and creating new entity instances.
These happen in different tiles, I want to have my local action forward to
the tile which called the action in the case of success or failure. Is this
possible (struts 1.1)
3.) How can I do a context switch from within action code to forward to a
different context (preferably without writing extra action elements in my
struts-admin.xml config file)
Thanks in advance , j
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Simple struts question.
Posted by Rick Reumann <st...@reumann.net>.
Bullard, James wrote:
> A couple tiles questions.
>
> 1.) Is there any way to have a global-forward forward to a tile, It always
> tells me that such a path does not exist, meaning that rather than recognize
> the page as tile def it thinks it is a page.
Hmm not sure what is wrong. You could try adding contextRelative="true"
to the global forward. We have some global forwards that look like:
<forward name="select.company.global" path="select.company.page"
contextRelative="true"/>
>
> 2.) I am using the same forms for editing and creating new entity instances.
> These happen in different tiles, I want to have my local action forward to
> the tile which called the action in the case of success or failure. Is this
> possible (struts 1.1)
I'm not exactly sure what you are asking, but if you set up two tiles
definitions, I'm not sure how there would be a problem. I might be
missing where the problem is.
>
> 3.) How can I do a context switch from within action code to forward to a
> different context (preferably without writing extra action elements in my
> struts-admin.xml config file)
Not sure about that.
Side note... using SiteMesh instead of tiles will make all of this
easier. You won't have to make a bunch of tile defiitions, you simple
forward to jsps. Based on the url pattern (or other ways) you then have
the page decorated for you. I threw up a simple example here
http://www.reumann.net/struts/lessons/sitemesh/rr_sitemesh_example.jsp
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org