[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    Re: Tiles "best practices" question
From:       Antonio Petrelli <apetrelli () apache ! org>
Date:       2006-10-31 8:07:42
Message-ID: 4547044E.7030100 () apache ! org
[Download RAW message or body]

Rick Schumeyer ha scritto:
> I have a layout that includes: <tiles:insert attribute="body"/>
>
> My definition does *not* include "body"
>
> The "actual" jsp page determines the proper value for "body":
>
> <tiles:insert definition="library.default">
> <tiles:put name="body" value="/pages/successBody.jsp"/>
> </tiles:insert>
>
> Question: the way I'm doing this means I now have *two *pages for 
> every page...in my case the "success.jsp" page that contains the 
> <tiles:insert> and also the "successBody.jsp" page containing the 
> actual content of the page.
>
> Is this necessary, or is there a better way?

Eh, this is a good question. There is another (but not necessarily 
better) way: create an extended definition for each page and then 
forward directly to the definition in your Struts action. Anyway they 
are still 2 objects (a definition and a JSP page) for each final page.
Probably a "better" way will be implemented in Tiles 2 (though I don't 
know what it will be :-) ).

Ciao
Antonio


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic