You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Eugene Kravchenko <eu...@kiev.offshorecreations.com> on 2005/07/25 11:23:21 UTC
Difference behavior JSF+SiteMesh and MyFaces+SiteMesh
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:
This is my JSF JSP t001.jsp page.
Panel:
This is my JSF JSP t002.jsp page.
Under apache realization unexpected result:
Body:
This is my JSF JSP t001.jsp page.
Panel:
This is my JSF JSP t001.jsp page.
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?