Details
Description
Due to the fact that we dispatch calls from MainPortlet -> MainServlet, the resulting portlet specific artifacts (like request, response, etc.) are wrapped to look like servlet artifacts and certain types and APIs that are specific to portlets are not available to the developer.
Issue Links
Activity
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #13954 | Wed May 23 13:21:10 MDT 2007 | deryk.sinotte | |
Files Changed | ||||
![]() ![]() |
Assignee | Deryk Sinotte [ deryk.sinotte ] |
Fix Version/s | 1.6 [ 10031 ] |
Attachment | PortletArtifactHack.java [ 10461 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #14104 | Mon Jun 11 14:30:13 MDT 2007 | deryk.sinotte | |
Files Changed | ||||
![]() |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Issue Type | Bug [ 1 ] | New Feature [ 2 ] |
Fix Version/s | 1.6DR#6 [ 10090 ] | |
Fix Version/s | 1.6 [ 10031 ] |
Fix Version/s | 1.6 [ 10031 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee | Deryk Sinotte [ deryk.sinotte ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #14516 | Tue Jul 17 11:48:48 MDT 2007 | mircea.toma | Refactor -- |
Files Changed | ||||
![]() ![]() ![]() |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #14517 | Tue Jul 17 13:53:55 MDT 2007 | mircea.toma | Recreate map wrapper to capture new request attributes -- |
Files Changed | ||||
![]() ![]() |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #14518 | Tue Jul 17 14:03:49 MDT 2007 | mircea.toma | More refactoring -- |
Files Changed | ||||
![]() ![]() ![]() |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #14523 | Wed Jul 18 16:24:26 MDT 2007 | mircea.toma | Copy the enumeration to avoid concurrency problems -- |
Files Changed | ||||
![]() |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #14610 | Fri Aug 03 12:37:56 MDT 2007 | jack.van.ooststroom | Backing out change for |
Files Changed | ||||
![]() |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Reopened [ 4 ] |
Fix Version/s | 1.6.1 [ 10070 ] | |
Fix Version/s | 1.7DR#1 [ 10100 ] | |
Fix Version/s | 1.6 [ 10031 ] | |
Fix Version/s | 1.6DR#6 [ 10090 ] | |
Affects Version/s | 1.6 [ 10031 ] | |
Affects Version/s | 1.6DR#4 [ 10060 ] |
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Affects | [Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration] | |
Resolution | Fixed [ 1 ] |
Fix Version/s | 1.6.1 [ 10070 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #14770 | Wed Aug 29 16:46:52 MDT 2007 | jack.van.ooststroom | Mircea: Refactor framework to detect and provide environment (servlet/portlet) specific functionality -- |
Files Changed | ||||
![]() |
Fix Version/s | 1.7 [ 10080 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
I checked in a very, very temporary mechanism for accessing portlet artifacts and APIs for this release. This should not be relied upon in any way, shape, or form in future releases.
To access the PortletRequest, PortletConfig, and their associated APIs, you can do the following:
First, you need to get an attribute from the request that was placed there before the dispatch:
FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext ec = fc.getExternalContext();
HttpServletRequest req = (HttpServletRequest)ec.getRequest();
Object obj = req.getAttribute(PortletArtifactHack.PORTLET_HACK_KEY);
The resulting object is an instance of PortletArtifactHack but it implements both PortletRequest and PortletConfig interfaces so you can cast it in any one of the following three ways depending on your requirements.
PortletArtifactHack hack = (PortletArtifactHack)obj;
PortletRequest portletRequest = (PortletRequest)obj;
PortletConfig portletConfig = (PortletConfig)obj;
Many of the methods throw UnsupportedOperationException()s. I've only exposed a few things that people need right away, like getPreferences().