Uploaded image for project: 'Portals Bridges (Retired)'
  1. Portals Bridges (Retired)
  2. PB-53

The method setDefaultView() sets the PortletSession attribute with a null value.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0
    • None
    • jsf
    • None
    • Sun JSF Reference Implementation version 1.2 (jsf-impl.jar)
      Websphere portlet container version 6.1.0
      Apache MyFaces JSF portal bridge version 1.0 (portals-bridges-jsf-1.0.jar)

    Description

      The method: org.apache.portals.bridges.jsf.FacesPortlet.setDefaultView(FacesContext, String, String) contains an else branch that is entered when the viewRoot value is null (line 589).

      This else branch creates a new viewRoot, a new view id, and sets both on the facesContext object. The code then creates a view root key and calls portal session set attribute with this key using the null viewRoot value, instead of the viewRoot object that was just created. The portlet session attribute map will contain a valid viewRoot key, but a null viewRoot value. This appears to be an error, because the viewRoot is always going to be null when this branch of code is entered.

      I propose that the method call (on line 594 of FacesPortlet) should look like this:

      portletRequest.getPortletSession().setAttribute(createViewRootKey(facesContext, view, viewId), facesContext.getViewRoot() );

      This will store the newly created viewRoot in the portlet session where it can be retrieved.

      Attachments

        Activity

          People

            taylor David Sean Taylor
            mbruzek Matthew Bruzek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: