Hi,
I've read the following thread:
http://www.mail-archive.com/users@myfaces.apache.org/msg55211.html
I tried using the provided implementation of PortletFaceletViewHandler
along with com.sun.facelets 1.1.14 without success. After some though
investigation I don't see how this implementation could work.
This is the stack trace:
Caused by: java.lang.NullPointerException
at
org.apache.myfaces.application.DefaultViewHandlerSupport.calculateFacesServletMapping(DefaultViewHandlerSupport.java:156)
at
org.apache.myfaces.application.DefaultViewHandlerSupport.getFacesServletMapping(DefaultViewHandlerSupport.java:116)
at
org.apache.myfaces.application.DefaultViewHandlerSupport.calculateViewId(DefaultViewHandlerSupport.java:48)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:504)
at
com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
at
com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
The provided PortletFaceletViewHandler implementation does not have a
restoreView() method, hence it is delegated to its parent, the
FaceletViewHandler. The NullPointerException eventually occurs when
trying to determine the FacesServletMappings. What is null is the
servletPath returned by the following method in myfaces
PortletExternalContextImpl:
public String getRequestServletPath()
{
return null; // must return null
}
I don't see how this could possibly work.
Furthermore, compare the suggested implementation to the
PortletViewHandler available in the myfaces portlet-bridge, which has
portlet-specific implementations of restoreView, createView, and others.
I'm either missing something or the original question about support for
Facelets in MyFaces' portlet-bridge still stands.
Thanks,
Rossen