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
-
- Closed
-
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Duplicate [ 3 ] |
Fix Version/s | 1.6 [ 10031 ] |
Fix Version/s | 1.6DR#6 [ 10090 ] | |
Fix Version/s | 1.6 [ 10031 ] |
Fix Version/s | 1.6 [ 10031 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |