Hi Everyone,
 

I've been trying out the MyFacesGenericPortlet, I am not sure to how get the portlet to show different content when switching portlet modes. What is the best way to do this?

I've looked at the DefaultViewSelector and thought I could implement that interface to look up init parameters for other default views based on the portlet mode, but it seems that the interface is lacking access to the PortletConfig object (  the PortletContext object gets init parameters for the application ). Could the DefaultViewSelector interface include access to the PortletConfig object in just the same way as the PortletContext?

For now hard coded default views jsps for the edit mode and the help mode, the next problem I faced was that a render Parameter view_id was included in my portlet mode urls. Looks like the performAction for the MyFacesGenericPortlet was setting

             if (!facesContext.getResponseComplete())
            {
                response.setRenderParameter(VIEW_ID, facesContext.getViewRoot().getViewId());
            }
           

The only time that I could see VIEW_ID used was in the next facesRender call,

        String viewId = request.getParameter(VIEW_ID);
        if ((viewId == null) || sessionTimedOut(request))
        {
            setPortletRequestFlag(request);
            nonFacesRequest(request,  response);
            return;
        }
      

Should this be changed to look up the information from the facesContext from the session instead? Or is this a bug with the Portal implementation that I am using?

Please let me know if I should open a JIRA issue.

Thanks in advance,

Wei Jun

 

Reply via email to