Hi Leonard,
> 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.
Incorrect usage. A component inside a component won't work; use an
attribute instead:
<stripes:layout-component name="mainComponent">
BEFORE EPI
${epiComponent}
AFTER EPI
</stripes:layout-component>
Hope that helps.
Cheers,
Freddy
- 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>
-
-
-------------------------------------------------------------------------
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