It still does not work (I misspoke too early). This is Stripes 1.4.3. It appears that when jsp declares to be part of layout that defines it's component to be be rendered as component from master template, it fails to find that component. This is what I have for test case,
mainTemplate.jsp <%@ include file="/WEB-INF/jsp/common/taglibs.jsp" %> <stripes:layout-definition> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" id="bcontrol"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="shortcut icon" href="images/common/favicon.ico" type="image/x-icon" /> </head> BEFORE MAIN <stripes:layout-component name="mainContent"/> AFTER MAIN </html> </stripes:layout-definition> epiLayout.jsp (Inner template < THIS IS WHERE THE PROBLEM, Stripes does not realize that it tries to declare 'epiComponent' inside of already declared 'mainComponent' from mainTemplate.jsp) <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ include file="/WEB-INF/jsp/portal-tag-libs.jsp" %> <stripes:layout-definition> <stripes:layout-render name="/WEB-INF/jsp/layout/mainTemplate.jsp" tabName="${tabName}" > <stripes:layout-component name="mainComponent"> BEFORE EPI <stripes:layout-component name="epiComponent"/> AFTER EPI </stripes:layout-component> </stripes:layout-render> </stripes:layout-definition> Home-tab.jsp (test page) <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ include file="/WEB-INF/jsp/portal-tag-libs.jsp" %> <stripes:layout-render name="/WEB-INF/jsp/layout/epiLayout.jsp" tabName="Home" > <stripes:layout-component name="epiComponent"> INSIDE EPI </stripes:layout-component> </stripes:layout-render> When the page renders, I only see text from mainTemplate.jsp - ' BEFORE MAIN AFTER MAIN'. Please confirm if this is a defect, incorrect usage, or not supported. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leonard Gestrin Sent: Thursday, May 08, 2008 10:55 AM To: Stripes Users List Subject: Re: [Stripes-users] layout question - is it possible tohave nested layouts with nested layout components? Thank you for that recommendation. Removing dashes did the trick. It's weird that it manifests itself only with nested layout component - works fine with '-' for one level of layering. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Freddy D. Sent: Thursday, May 08, 2008 6:24 AM To: [email protected] Subject: Re: [Stripes-users]layout question - is it possible to have nested layouts with nested layout components? Just one recommendation: avoid using "spa ces" and "da-shes" in the names of your components. Prefer "under_scores" or "CaMelCase", it will save you from possibly getting problems that are difficult to track down. Cheers, Freddy On 07-05-2008 at 22:56, Leonard Gestrin wrote: - Hello, - Please, validate if this is possible. - - I have master-layout.jsp with component main-component. [...] - I have app-layout.jsp that I want to be rendered inside - master-layout.jsp but also I want it to declare it's own component. [...] - I want jsps to be able to be rendered in place of sub-main-component of - app-layout.jsp which in turn gets rendered in master-layout.jsp but it - does not seem to work. - - <stripes:layout-render name="/WEB-INF/jsp/layout/app-layout.jsp" > - <stripes:layout-component name=" sub-main-content "> - TESTING - </stripes:layout-component> - </stripes:layout-render> - - Is there a way to make it work this way or layout components can not be - nested? This should work exactly like that. At least it's the approach I used to create a master layout, a menu layout and a further nested layout for administrative page¿. The master layout is even used for the login page as well. This works, because I mapped the Stripe¿Filter for forward requests to my login.jsp and loginError.jsp pages. Oscar ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
