@Override public Object getSessionAttribute(String name) { Object value = null; PortletSession portletSession = (PortletSession) getSession(false); if (portletSession != null) { value = portletSession.getAttribute(name); } return value; }
@Override public String getRequestQueryString() { // Some portlet bridges (like the ICEfaces bridge) wrap the portal's // PortletRequest implementation instance (which prevents us from getting // the query_string). As a workaround, we can still get it the original // PortletRequest instance, because the Portlet spec says it must be // stored in the javax.portlet.request attribute. String queryString = null; Object portletRequestAsObject = getRequestAttribute(REQUEST_ATTR_PORTLET_REQUEST); if ((portletRequestAsObject != null) && (portletRequestAsObject instanceof PortletRequest)) { PortletRequest portletRequest = (PortletRequest) portletRequestAsObject; queryString = (String) portletRequest.getAttribute("javax.servlet.forward.query_string"); } return queryString; }
@Override public String getRequestQueryString() { // Some portlet bridges (like the ICEfaces bridge) wrap the portal's // PortletRequest implementation instance (which prevents us from getting // the query_string). As a workaround, we can still get it the original // PortletRequest instance, because the Portlet spec says it must be // stored in the javax.portlet.request attribute. String queryString = null; Object portletRequestAsObject = getRequestAttribute(REQUEST_ATTR_PORTLET_REQUEST); if ((portletRequestAsObject != null) && (portletRequestAsObject instanceof PortletRequest)) { PortletRequest portletRequest = (PortletRequest) portletRequestAsObject; queryString = (String) portletRequest.getAttribute("javax.servlet.forward.query_string"); } return queryString; }
@Override public void setSessionAttribute(String name, Object value) { PortletSession portletSession = (PortletSession) getSession(true); if (portletSession != null) { portletSession.setAttribute(name, value); } } }
@Override public Object getSessionAttribute(String name) { Object value = null; PortletSession portletSession = (PortletSession) getSession(false); if (portletSession != null) { value = portletSession.getAttribute(name); } return value; }
@Override public void setSessionAttribute(String name, Object value) { PortletSession portletSession = (PortletSession) getSession(true); if (portletSession != null) { portletSession.setAttribute(name, value); } } }