@Override public void setAttribute(String name, Object value, int scope) { wrapped.setAttribute(name, value, scope); }
@Override public void setAttribute(String name, Object value) { wrapped.setAttribute(name, value); }
@Override public void setAttribute(String name, Object value) { session.setAttribute(name, value); }
public void initialize(PortletSession portletSession) { portletSession.setAttribute( PERCENT + _progressId, this, PortletSession.APPLICATION_SCOPE); }
session.setAttribute(name, value, scope);
public static short getShort( PortletRequest portletRequest, String param, short defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { short value = GetterUtil.getShort(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Short portletSessionValue = (Short)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static long getLong( PortletRequest portletRequest, String param, long defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { long value = GetterUtil.getLong(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Long portletSessionValue = (Long)portletSession.getAttribute(param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static int getInteger( PortletRequest portletRequest, String param, int defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { int value = GetterUtil.getInteger(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Integer portletSessionValue = (Integer)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static double getDouble( PortletRequest portletRequest, String param, double defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { double value = GetterUtil.getDouble(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Double portletSessionValue = (Double)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static boolean getBoolean( PortletRequest portletRequest, String param, boolean defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { boolean value = GetterUtil.getBoolean(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Boolean portletSessionValue = (Boolean)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static String getString( PortletRequest portletRequest, String param, String defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { String value = GetterUtil.getString(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { String portletSessionValue = (String)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static double getDouble( PortletRequest portletRequest, String param, double defaultValue, Locale locale) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { double value = GetterUtil.getDouble(portletRequestValue, locale); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Double portletSessionValue = (Double)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public Object setValue(Object obj) { session.setAttribute(key, obj); return value; } });
protected void setAttribute(String key, Object value) { // force session creation PortletSession session = request.getPortletSession(true); if (value instanceof AttributeMapBindingListener) { // wrap session.setAttribute(key, new HttpSessionMapBindingListener((AttributeMapBindingListener) value, this)); } else { session.setAttribute(key, value); } }
public void setSessionSharedAttribute(String name, Object value) { PortletSession portletSession = (PortletSession) FacesContext.getCurrentInstance().getExternalContext() .getSession(true); if (portletSession != null) { portletSession.setAttribute(name, value, PortletSession.APPLICATION_SCOPE); } }
void addMessage(String message,PortletSession session,String sessionAttributeName) { List messageList=(List) session.getAttribute(sessionAttributeName); if(messageList==null) { messageList=new ArrayList(); session.setAttribute(sessionAttributeName,messageList); } messageList.add(message); }
public Object setValue(Object value) { Object oldValue = getValue(); portletSession.setAttribute(getKey(), value, scope); return oldValue; } }
private static State getPortletState(FacesContext context, Object session) { javax.portlet.PortletSession portletSession = (javax.portlet.PortletSession) session; State state = (State) portletSession.getAttribute(WindowScopeManager.class.getName(), javax.portlet.PortletSession.APPLICATION_SCOPE); if (state == null) { state = new State(EnvUtils.getWindowScopeExpiration(context)); portletSession.setAttribute(WindowScopeManager.class.getName(), state, javax.portlet.PortletSession.APPLICATION_SCOPE); } return state; }
public void newPortletApp(ActionRequest request, ActionResponse response) { this.clearSession(request); final PortletSession session = request.getPortletSession(); session.setAttribute(PARAM_WIZ_MODE, MODE_NEW); }
protected String resolveCurrentPageName(PortletRequest request) { final PortletSession session = request.getPortletSession(); final String paramCurrentPage = super.resolveCurrentPageName(request); if (paramCurrentPage != null) { session.setAttribute(this.getWizardPageParam(), paramCurrentPage); return paramCurrentPage; } else { final String sessionCurrentPage = (String)session.getAttribute(this.getWizardPageParam()); return sessionCurrentPage; } }