Closed
Description
Alexandre Clement opened SPR-5637 and commented
the FacesRequestAttributes getAttributeMap() function doesn't handle the SCOPE_GLOBAL_SESSION.
protected Map getAttributeMap(int scope) {
if (scope == SCOPE_REQUEST) {
return getExternalContext().getRequestMap();
}
else {
return getExternalContext().getSessionMap();
}
}
I had to access to the underlying portletsession to manage it. I didn't find a way to do it without declaring a dependency on the portlet-api.
protected Map getAttributeMap(int scope) {
if (scope == SCOPE_REQUEST) {
return getExternalContext().getRequestMap();
}
else if (scope == SCOPE_SESSION) {
return getExternalContext().getSessionMap();
} else {
Object session = getExternalContext().getSession(true);
if (session instanceof PortletSession) {
return ((PortletSession)session).getAttributeMap(PortletSession.APPLICATION_SCOPE);
} else {
return getExternalContext().getSessionMap();
}
}
}
Sub-tasks:
- please have a look to my last comment [SPR-5649] #10320 please have a look to my last comment
Referenced from: commits 2524ca3