|
Can I do this?
addUserPage.jsp:
<clay:clay jsfid="/layout.html" id="layout"> <clay:symbol name="title" value="Welcome to the Add User Page"/> <clay:symbol name="header" value="/header.html"/> <clay:symbol name="body"> <h:outputLabel for="" value="User Name:"../><h:inputText id="UserName" .../> ... <h:commandButton .../> </clay:symbol> </clay:clay>
Shawn
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>From: "Garner, Shawn" <[EMAIL PROTECTED]>
I think that's a common comment. Outside a creating more example, and better documentation, I'm not sure what the answer is but we can always use more help here.
A limitation that Clay has is that you are not able to include a JSP from a Clay XML definition or HTML template. This is a reflection on the fact that the JSF/JSP tags are not designed to be mixed with other view types.
However, you could use JSP as your entry point and include a Clay subview using the "clay:clay" tag.
page1.jsp:
<clay:clay jsfid="/layout.html" id="layout"> <clay:symbol name="header" value="/header.html"/> <clay:symbol name="body" value="/page1.html"/> </clay:clay>
or
page1.jsp:
<clay:clay jsfid="basePage" id="layout"> <clay:symbol name="header" value="/header.html"/> <clay:symbol name="body" value="/page1.html"/> </clay:clay>
Clay XML Config:
<!-- Base layout defintion -->
The catch is that you can not include another JSP from within the "layout.html". The JSP page would only be the page entry point.
Anything included in the "layout.html" has to use clay HTML templates or XML config definitions.
Originally, the JSP page entry point was the only option. This might make a nice sample applicaiton?
The option that is the most like tiles is to use an XML config as the entry point. The symbols "page1.xml" and "page2.xml" usecase example shows how this works. Both definitions are found in a common XML. But, the same rule about including JSP applies here too.
I've been trying to figure out how to include a JSP from a clay template but the JSP Tag is not standardized in this area. I've been thinking about trying to create a decorated view root and swap out the view root before including the jsp and then swapping it back.
Most people seem interested in a non-jsp solution so I haven't put much time into this hack.
Hope that helps.
Gary **************************************************************************** This email may contain confidential *************************************************************************** |
- RE: [JSF] Tiles and Reusable Template Garner, Shawn
- RE: [JSF] Tiles and Reusable Template Gary VanMatre
- RE: [JSF] Tiles and Reusable Template CONNER, BRENDAN \(SBCSI\)
- RE: [JSF] Tiles and Reusable Template Garner, Shawn
- ADF showOneTab and CSS Jeremy Sager
- Re: ADF showOneTab and CSS Jonas Jacobi
- RE: ADF showOneTab and CSS Jeremy Sager
- RE: [JSF] Tiles and Reusable Template CONNER, BRENDAN \(SBCSI\)

