Bill Schneider wrote:
The idea is that most tiles extend .mainLayout and look like
HEADER [body] FOOTER
But some tiles extend .nestedLayout instead, which in turn extends .mainLayout for two layers of navigation:
HEADER Nested Header [nested body] Nested Footer FOOTER
The nested header+body+footer together form the "body" within the .mainLayout tile. But there are several tiles like this, which hold the Nested header/footer constant while varying the nested body. Hence the .nestedLayout tile extends .mainLayout, defining a new "nestedBody" slot.
I think .nested1 extends .nestedLayout extends .mainLayout is logical and almost works--just can't figure out how to (cleanly) get the nestedBody attribute value where I need it.
Let me start over, Bill. Maybe if you started describing your problem in Tiles terminology instead of "nested" terminology we could understand each other better and quicker. HTML pages are inherently made up of rectangles which are then divided either horizontally or vertically (not both) into more retangles, or not. Each rectangle can be a tile. Layouts are the boss tiles. Neither templates nor definitions are more important than layouts, even though at times they may /look/ more important. If you look at the actual servlet created from a layout, you will see the big picture. Definitions and templates just give alternative ways to fill in the same layout. The end process is always to get a writer from a page context and to write the page, top to bottom. The short presentation in Ted Husted's book on pages 326-7 (Section 11.2.1 But what is a tile?) is important. These are things you must know:
1. A tile is a retangular area in a JSP page sometimes referred to as a region.
2. Tiles are built recursively and can be represented as a tree (upside down, of course).
3. Each tree "node" is a tile or region.
4. The root node is usually the page.
5. Final nodes or "leaves" contain the page content. [This is not wholly accurate. You can have as much content on the way down the tree as you want.]
6. Layout nodes are utility tiles that position tiles within pages, i.e. they have INSERTs <tiles:insert> or provide background markup.
7. Tiles support features, including "parameters" or "ATTRIBUTES" and "DEFINITIONS".
8. Parameters are called "attributes" and accept variable information at RUNTIME.
9. Tile attributes are defined WHEN INSERTING THE TILE and are VISIBLE WITHIN THE TILE ONLY. (This avoids name conflicts.)
10. Tile attributes can be Strings or other types.
11. Definitions are a SET OF ATTRIBUTES (a SCREEN) which become a discrete object with its own IDENTITY.
12. You can create other screens from definitions. 13. Definitions are optional. You can deploy a tile using a simple JSP tag.
14. Definitions allow simple overloading of attributes that change.
15. A definition is like an <tiles:insert> tag with a NAME.
16. Because of the name, you can: OVERLOAD (additional or replacement attributes), EXTEND (using one definition as the base), and REUSED (by storing in a jsp file or an XML document), and useit as the TARGET of a Struts ActionForward.
1. Can be specified statically or an action can pass the value of an attribute to the tile at runtime.
Enough. I hope this was not overkill. I thought some of this might not have been obvious to you, given your questions. And, I hope some of it may be helpful. If you knew all of this already, let's hope someone didn't.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]