Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-1394

ViewTag makes wrong class cast when using locale attribute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.1.5-SNAPSHOT
    • None
    • Portlet_Support
    • None
    • Java 1.5.0.06 + JBoss Portal Server 2.2.1-SP3

    Description

      When using JSF inside a portlet the locale attribute of the view-tag can not be used because a ClassCastException is thrown.
      This is because ViewTag.setProperties(UIComponent component) assumes that getFacesContext().getExternalContext().getRequest() returns a javax.servlet.ServletRequest which is only correct for non-portlets. For portlets it returns an javax.portlet.PortletRequest which can not be casted to javax.servlet.ServletRequest.

      See also:
      http://java.sun.com/javaee/javaserverfaces/1.0/docs/api/javax/faces/context/ExternalContext.html#getRequest()

      Attachments

        Activity

          People

            Unassigned Unassigned
            jbug Jan Peter Stotz
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: