|
I’m evaluating usage of MyFaces with SiteMesh. Already, at first step I faced with problem: difference behavior with
Sun realization and Apache. Description. Assume we use two pages: p1.jsp and p2.jsp. Each file contains body: p1.jsp <body>
<f:view>
This is JSF p1.jsp page. <br>
</f:view> </body> p2.jsp <body>
<f:view>
This is JSF p2.jsp page. <br>
</f:view> </body> SiteMesh decorator file content: <decorators
defaultdir="/WEB-INF/jsp/decorators">
<decorator name="main" page="main.jsp">
<pattern>/t001.jsf</pattern>
</decorator>
<decorator name="panel" page="panel.jsp"/> </decorators> and layouts: main.jsp <%@ page language="java"
pageEncoding="UTF-8"%> <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator"
prefix="decorator" %> <%@ taglib
uri="http://www.opensymphony.com/sitemesh/page"
prefix="page" %> <html> <body>
Body: <BR>
<decorator:body />
Panel: <BR>
<page:applyDecorator page="/t002.jsf" name="panel"
id="t002"/> </body> </html> panel.jsp <%@ taglib
uri="http://www.opensymphony.com/sitemesh/decorator"
prefix="decorator" %> <decorator:body /> As response we have: Under sun realization suitable result: Body: Under apache realization unexpected result: Body: After research MyFaces implementation code under debugger, I found
following stranges: When SiteMesh trying apply decoration, in
org.apache.myfaces.lifecycle.LifecycleImpl object’s restoreView call
viewed has value ‘t001.jsp’ It is a bug? |

