Hi There,
I have a web application that uses JSF 2 and spring webflow that I am attempting to convert to portlets to use in Liferay.
Webflow 2.3.1 does not support JSF2 in portlets according to the docs, so I am using a snapshot build of 2.4 (which according to https://jira.springsource.org/browse/SWF-1550 will do so).
If I take the booking-portlet-faces sample and alter it to use webflow 2.4 and myfaces 2.1.9, then the portlet will load fine in Liferay, but the required js libraries won't be included.
If I attempt to use either the JSF2 reference implmentation, or the Liferay Faces Bridge, then I get a null pointer exception when loading a page with the portlet on it.
I believe the null pointer exception may be a bug in webflow, as when a portlet context, webflow creates ato act as a faces context. The constructor for this is:Code:org.springframework.faces.webflow.context.portlet.PortletFacesContextImpl
Which works fine in myfaces, however for the JSF2 RI and the Liferay Faces Bridge, the method callCode:public PortletFacesContextImpl(PortletContext portletContext, PortletRequest portletRequest, PortletResponse portletResponse) { application = JsfUtils.findFactory(ApplicationFactory.class).getApplication(); renderKitFactory = JsfUtils.findFactory(RenderKitFactory.class); this.externalContext = new PortletExternalContextImpl(portletContext, portletRequest, portletResponse); this.exceptionHandler = JsfUtils.findFactory(ExceptionHandlerFactory.class).getExceptionHandler(); FacesContext.setCurrentInstance(this); }results in a class that assumes a faces context already exists - it uses the faces context to determine if the current request is an ajax request.Code:JsfUtils.findFactory(ExceptionHandlerFactory.class)
I am unsure if this is an issue in webflow, or in the underlying libraries assuming thatwill only be called when the faces context is initalised.Code:getExceptionHandler
Can anyone either point we to a workaround for either issue?
Thanks.


Reply With Quote