You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniel Draws <da...@helenos.de> on 2003/07/29 11:05:10 UTC
Sounds simple, but it isn't: How to pass an attribute to a nested tile?
Hi all!
Is there anybody out there who can solve the following problem:
I have a main and a more special tile defintion declared in the
tiles-defs.xml:
<definition name="view.base.layout" page="/mainlayout.jsp">
<put name="head" value="..."/>
<put name="body" value=""/>
<put name="menu" value="..."/>
<put name="foot" value="..."/>
</definition>
<definition extends="view.base.layout" name="view.special.layout">
<put name="body" value="/special.jsp"/>
</definition>
the special.jsp defines a more conrete layout for the body:
<some html snippet>
<tiles:insert attribute="content"/>
</some html snippet>
Now I want to define a concrete jsp, wich inserts the view.special.layout
and passes the content attribute through that to the special.jsp.
My idea was the following jsp:
<tiles:insert defintion="view.special.layout">
<tiles:put name="content" type="string">
<some special html />
</tiles:put>
</tiles:insert>
So what? I was a little bit naive and at the end this doesn't work.
Is there anybody out there who could help me?
thanks for your help!
daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Sounds simple, but it isn't: How to pass an attribute to a nested
tile?
Posted by Tim Shadel <ti...@zserve.com>.
Daniel,
This thread discusses something similar:
http://marc.theaimsgroup.com/?l=struts-user&m=105290962918724&w=2
It's a bit long, and the discussion seemed to help one of the two
original questioners. It may work for you too.
HTH,
Tim
Daniel Draws wrote:
> Hi all!
>
> Is there anybody out there who can solve the following problem:
>
> I have a main and a more special tile defintion declared in the
> tiles-defs.xml:
>
> <definition name="view.base.layout" page="/mainlayout.jsp">
> <put name="head" value="..."/>
> <put name="body" value=""/>
> <put name="menu" value="..."/>
> <put name="foot" value="..."/>
> </definition>
> <definition extends="view.base.layout" name="view.special.layout">
> <put name="body" value="/special.jsp"/>
> </definition>
>
>
> the special.jsp defines a more conrete layout for the body:
>
> <some html snippet>
>
> <tiles:insert attribute="content"/>
>
> </some html snippet>
>
>
>
> Now I want to define a concrete jsp, wich inserts the view.special.layout
> and passes the content attribute through that to the special.jsp.
>
> My idea was the following jsp:
>
> <tiles:insert defintion="view.special.layout">
> <tiles:put name="content" type="string">
> <some special html />
> </tiles:put>
> </tiles:insert>
>
>
> So what? I was a little bit naive and at the end this doesn't work.
>
> Is there anybody out there who could help me?
>
> thanks for your help!
>
> daniel
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org