Details
Description
                    In a typical JSF portlet, developers do the following in order to get PortletPreferences and PortletConfig:
Object requestObject = facesContext.getExternalContext().getRequest();
PortletRequest portletRequest = (PortletRequest) requestObject;
PortletPreferences portletPreferences = portletRequest.getPreferences();
However, the typcast is failing, because the facesContext.getExternalContext().getRequest() method is always returning an object of type ServletEnvironmentRequest.
And of course, ServletEnvironmentRequest does not have a getPreferences() method.
Object requestObject = facesContext.getExternalContext().getRequest();
PortletRequest portletRequest = (PortletRequest) requestObject;
PortletPreferences portletPreferences = portletRequest.getPreferences();
However, the typcast is failing, because the facesContext.getExternalContext().getRequest() method is always returning an object of type ServletEnvironmentRequest.
And of course, ServletEnvironmentRequest does not have a getPreferences() method.
Issue Links
- duplicates
- 
             ICE-1625
        Make Portlet specific artifacts and APIs accessible to developers ICE-1625
        Make Portlet specific artifacts and APIs accessible to developers-           
- Closed
 
-         
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
 Bug
 Bug