public FacesContext getFacesContext(Object config, Object request, Object response, Lifecycle lifecycle)
throws FacesException
{
if (config instanceof PortletConfig)
{
PortletConfig pc = (PortletConfig)config;
PortletContext context = pc.getPortletContext();
PortletFacesContextImpl facesContext = new PortletFacesContextImpl(
(PortletContext) context,
(PortletRequest) request,
(PortletResponse) response);
String defaultViewName = pc.getInitParameter(FacesPortlet.PARAM_VIEW_PAGE);
// facesContext.resolveViewRoot(defaultViewName, (PortletRequest)request);
return facesContext;
}
else
{