Ray:
Did you check out this article by Chuck Cavaness?
http://www.oreilly.com/catalog/jakarta/chapter/ch14.html
Martin-
----- Original Message -----
From: "Ray Madigan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Wednesday, June 08, 2005 8:59 PM
Subject: RE: [Tiles]
I guess I'm not sure about Mike's suggestion.
He wrote:
use <tiles:insert attribute="navi"/>
the "navi" is defined in tiles definition file like "header" does.
Is this in the layout file?
maybe im mixing up which file is which.
I have a layout definition that includes the code in my original post.
It is called from a jsp that inserts it along with some attributes. I
want
everything about this attribute to be dealt with in the layout file. I do
not have a definition for this tile in the struts-config file.
I don't understand what a tiles controller is. I read the javadoc on it
and
TileAction and can't figure how to implement it or how it can help.
I copy the attribute (it this case Foo), which is in sessionScope into the
layout tile. <c:out > can see it, but <tile:insert can't .
What works is if in the jsp that inserts the layout if I
<c:set var='navi' value='/src/${Foo.answer}/nav.jsp'/>
<tile:insert page='layout'>
<tile:put attribute='navi'/>
</tile:insert>
I cannot get anything to work in the layout jsp itself. I think this is
what Mike was saying.
Is there any web literature on what a tile controller is, how it works,
and
how you implement one?
Thanks
-----Original Message-----
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 08, 2005 3:36 PM
To: Struts Users Mailing List
Subject: RE: [Tiles]
Ray,
If Xinsheng [mike] Huang's suggestion about using the JSP ($) dollar sign
notation doesn't work, I'd suggest looking at giving your template a tiles
controller so you can set the navi attribute to some object and scope.
That
way the controller can specify the insert automatically before the tile is
rendered and without having to put code into every action, just that one
tile's controller class.
Regards,
David
-----Original Message-----
From: Ray Madigan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 08, 2005 5:18 PM
To: Struts Users Mailing List
Subject: RE: [Tiles]
I have a fairly simple situation where a set of pages are used throughout
the application. Based on a set of crriteria known about the user, I
want
the page to use a set of common tiles to fill some parts of the page, like
the header of the page. Other parts of the page are filled with specific
tiles relative to what the page is attempting to show. Instead of each of
the pages that use the layout setting the attribute, I thought if it was
computed in the layout, I would save some management of these entries.
-----Original Message-----
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 08, 2005 1:58 PM
To: Struts Users Mailing List
Subject: RE: [Tiles]
Ray,
What architectural problems prevent you from either using a TilesAction,
instead of a regular action, or a tiles controller to look those things up
and set them for you so the page doesn't need to be 'that smart?'
Regards,
David
-----Original Message-----
From: Ray Madigan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 08, 2005 5:01 PM
To: Struts Users Mailing List
Subject: [Tiles]
I have beat this situation to death without coming up with an answer.
I want to create a tile layout that includes a composed tile in the layout
definition.
Any suggestions would be appreciated
It needs to look like
<table border="0" width="100%" cellspacing="5">
<tr><td colspan="2">
<tiles:insert attribute="header" />
</td>
</tr>
<tr><td width="140" valign="top">
** <tiles:insert page='/src/${Foo.answer}/nav.jsp'/>
OR <c:set var='navi' value='/src/${Foo.answer}/nav.jsp'/>
** <!-- <c:out value='${navi}'/> outputs the correct page -->
** <tiles:insert attribute='navi'/>
** <!-- navi is in the wrong scope? ->
</td>
<td valign="top" align="left">
<tiles:insert attribute='body' />
</td>
</tr>
<tr><td colspan="2">
<tiles:insert attribute="footer" />
</td>
</tr>
</table>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]