This still doesn't keep me from having to duplicate entries for each section of our site (we have 5 - garden, school, office, crafts, housewares) - and other non-Action driven pages need the same .baseLayout extended Tiles for each of the sections (.baseLayout.school, etc.) - and those definitions define the sections colors and a variety of other things.

Vic Cekvenich wrote:

Flip it and revrse it, go to tiles, that call actions:
<definition name="myPage1" extends="baseLayout">
        <put name="body" value="/do/myPage1"/>
        <put name="tile" value="/do/myTile"/>
/>
<definition name="myPage2" extends="baseLayout">
        <put name="body" value="/do/myPage2"/>
        <put name="tile" value="/do/myTile"/>
/>


And then yor Struts mapping forwards are <forward name="Success" path ="/WEB-INF/jsp/myPage1.jsp" ...

<forward name="Success" path ="/WEB-INF/jsp/myPage2.jsp"

You can (should?) have a /do in a tile, for action to figure out what JSP to assemble. Also explained in Tiles 201.

.V


Brice Ruth wrote:


I have an Action that will do some DB things and currently return a pre-defined ActionForward that links to a pre-defined Tile definition. Examples are below. What I want to do, is save myself some typing, and assemble the tile definition dynamically in the Action, and then return a new ActionForward for that definition (or something like this). The reason being, the forwards & Tile definitions (currently) would need to be duplicated 4 additional times to support the different sections of our site.

Any suggestions? I'd need to be able to create definitions that extend pre-defined ones (like .baseLayout.garden) as well as setting attributes that reference pre-defined definitions (like .mainLayout). Thanks in advance!

Forwards:
       <forward
           name="displayProduct"
           path="garden.product"/>
       <forward
           name="showCategory"
           path="garden.category"/>

Tile-Defs:
<definition name="garden.product" extends=".baseLayout.garden">
<put name="mainLayout" value=".mainLayout"/>
<put name="navigation" value=".navigation.level3"/>
<put name="content" value="/common/tiles/productContent.jsp"/>
</definition>
<definition name="garden.category" extends=".baseLayout.garden">
<put name="mainLayout" value=".mainLayout"/>
<put name="navigation" value=".navigation.level3"/>
<put name="content" value="/common/tiles/productCategoryContent.jsp"/>
</definition>




-- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to