You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pat Quinn <pa...@hotmail.com> on 2003/06/09 02:06:31 UTC
[Tiles Beginner Question] Href & Tile Definitions
I've successfully got tiles up and running... I do understand how i can use
a tile definition as a struts forward for my actions.... but i'm looking to
redirect to a tile definition using a href link. E.g.
I have the following tile definition:
<definition name="my.home" extends="default" >
<put name="title" value="MY PAGE TITLE HERE"/>
<put name="body-content" value="home-body.jsp"/>
</definition>
I have tried the following but it doesn't work (i.e. passing the tile id as
a parameter to the ForwardAction):
<action path="/home"
parameter="my.home"
scope="request"
type="org.apache.struts.actions.ForwardAction"
validate="false">
</action>
I guess what i'm really asking is there a predefined Action which will take
my tile Id and forward to this view....
Its not that i'm lazy as i could write one if i need too but this would mean
that i have to create a global forward for any tiles i want to access using
a href and then pass the global id to a temporary action in order to view my
definition which sounds like a very round about way to achieve this.
Any ideas guys??
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: [Tiles Beginner Question] Href & Tile Definitions
Posted by Sandeep Takhar <sa...@yahoo.com>.
sorry I accidently hit <tab> on the last reply and it
sent the email somehow (some weird combination of
keystrokes).
What I wanted to finish was the action...
<action path="/home"
scope="request"
type="com.xxx.xxx.FowardAction"
validate="false">
<forward
name="display" path="my.home"/>
</action>
this probably doesn't answer your question the way you
want is my guess.
you can always call this from another action
<forward name="home" path="/Home.do"/>
sandeep
--- Pat Quinn <pa...@hotmail.com> wrote:
> I've successfully got tiles up and running... I do
> understand how i can use
> a tile definition as a struts forward for my
> actions.... but i'm looking to
> redirect to a tile definition using a href link.
> E.g.
>
> I have the following tile definition:
>
> <definition name="my.home" extends="default" >
> <put name="title" value="MY PAGE TITLE HERE"/>
> <put name="body-content" value="home-body.jsp"/>
> </definition>
>
>
> I have tried the following but it doesn't work (i.e.
> passing the tile id as
> a parameter to the ForwardAction):
>
> <action path="/home"
> parameter="my.home"
> scope="request"
>
> type="org.apache.struts.actions.ForwardAction"
> validate="false">
> </action>
>
>
> I guess what i'm really asking is there a predefined
> Action which will take
> my tile Id and forward to this view....
>
>
> Its not that i'm lazy as i could write one if i need
> too but this would mean
> that i have to create a global forward for any tiles
> i want to access using
> a href and then pass the global id to a temporary
> action in order to view my
> definition which sounds like a very round about way
> to achieve this.
>
> Any ideas guys??
>
>
_________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months
> FREE*
> http://join.msn.com/?page=features/virus
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: [Tiles Beginner Question] Href & Tile Definitions
Posted by Sandeep Takhar <sa...@yahoo.com>.
I think you don't want to create an action to handle
the tiles reference right?
If not, then you can simply create a global action
that forwards to "display" say..
<action path="/home"
scope="request"
type="org.apache.struts.actions.ForwardAction"
validate="false">
</action>
--- Pat Quinn <pa...@hotmail.com> wrote:
> I've successfully got tiles up and running... I do
> understand how i can use
> a tile definition as a struts forward for my
> actions.... but i'm looking to
> redirect to a tile definition using a href link.
> E.g.
>
> I have the following tile definition:
>
> <definition name="my.home" extends="default" >
> <put name="title" value="MY PAGE TITLE HERE"/>
> <put name="body-content" value="home-body.jsp"/>
> </definition>
>
>
> I have tried the following but it doesn't work (i.e.
> passing the tile id as
> a parameter to the ForwardAction):
>
> <action path="/home"
> parameter="my.home"
> scope="request"
>
> type="org.apache.struts.actions.ForwardAction"
> validate="false">
> </action>
>
>
> I guess what i'm really asking is there a predefined
> Action which will take
> my tile Id and forward to this view....
>
>
> Its not that i'm lazy as i could write one if i need
> too but this would mean
> that i have to create a global forward for any tiles
> i want to access using
> a href and then pass the global id to a temporary
> action in order to view my
> definition which sounds like a very round about way
> to achieve this.
>
> Any ideas guys??
>
>
_________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months
> FREE*
> http://join.msn.com/?page=features/virus
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org