/**
* Sets a session attribute.
*
* @param context
* the faces context
* @param attributeName
* the attribute name
* @param value
* the value
* @param shared
* set the attribute with shared (application) scope?
*/
public static void setPortletSessionAttribute(FacesContext context, String attributeName, Object value,
boolean shared)
{
Object portletReq = context.getExternalContext().getRequest();
if (portletReq != null && portletReq instanceof PortletRequest)
{
PortletSession session = ((PortletRequest) portletReq).getPortletSession();
session.setAttribute(attributeName, value, shared ? PortletSession.APPLICATION_SCOPE
: PortletSession.PORTLET_SCOPE);
}
else
{
context.getExternalContext().getSessionMap().put(attributeName, value);
}
}
AlfrescoFacesPortlet.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:community-edition-old
作者:
评论列表
文章目录