Package javax.portlet

Examples of javax.portlet.PortletSession.removeAttribute()


    {
      PortletSession portletSession = mPortletRequest.getPortletSession(false);

      if (portletSession != null)
      {
        portletSession.removeAttribute(key, mScope);
      }
    }
  }

  @SuppressWarnings("unchecked")
View Full Code Here


    protected void removeAttribute(String key)
    {
        PortletSession portletSession = getSession();
        if (portletSession != null)
        {
            portletSession.removeAttribute(key, PortletSession.PORTLET_SCOPE);
        }
    }

    @Override
    @SuppressWarnings("unchecked")
View Full Code Here

        PortletSession session = getSession();
        if (session == null) return;
        for (Enumeration attributeNames = session.getAttributeNames(PortletSession.PORTLET_SCOPE);
             attributeNames.hasMoreElements(); ) {
            String attributeName = (String)attributeNames.nextElement();
            session.removeAttribute(attributeName);
        }
    }
}
View Full Code Here

        if (session != null) {
          if (request.getParameter(IMPLICIT_MODEL_RENDER_PARAMETER) != null) {
            implicitModel = (ExtendedModelMap) session.getAttribute(IMPLICIT_MODEL_SESSION_ATTRIBUTE);
          }
          else {
            session.removeAttribute(IMPLICIT_MODEL_SESSION_ATTRIBUTE);
          }
        }
      }
      if (handler.getClass().getAnnotation(SessionAttributes.class) != null) {
        // Always prevent caching in case of session attribute management.
View Full Code Here

      request.getPortletSession().setAttribute(name, value, scope);
    }
    else {
      PortletSession session = request.getPortletSession(false);
      if (session != null) {
        session.removeAttribute(name, scope);
      }
    }
  }

  /**
 
View Full Code Here

              logger.debug("Render phase found exception caught during action phase - rethrowing it");
              throw ex;
            }
          }
          else {
            session.removeAttribute(ACTION_EXCEPTION_SESSION_ATTRIBUTE);
          }
        }

        // Actually invoke the handler.
        HandlerAdapter ha = getHandlerAdapter(mappedHandler.getHandler());
View Full Code Here

    }
    else {
      PortletSession session = getSession(false);
      if (session != null) {
        if (scope == SCOPE_GLOBAL_SESSION) {
          session.removeAttribute(name, PortletSession.APPLICATION_SCOPE);
          this.globalSessionAttributesToUpdate.remove(name);
        }
        else {
          session.removeAttribute(name);
          this.sessionAttributesToUpdate.remove(name);
View Full Code Here

        if (scope == SCOPE_GLOBAL_SESSION) {
          session.removeAttribute(name, PortletSession.APPLICATION_SCOPE);
          this.globalSessionAttributesToUpdate.remove(name);
        }
        else {
          session.removeAttribute(name);
          this.sessionAttributesToUpdate.remove(name);
        }
      }
    }
  }
View Full Code Here

        switch (action) {
            case CLEAR: {
                if (portletSession != null) {
                    for (final Enumeration<String> attributeNames = (Enumeration<String>) portletSession.getAttributeNames(scope); attributeNames.hasMoreElements();) {
                        final String attributeName = attributeNames.nextElement();
                        portletSession.removeAttribute(attributeName, scope);
                    }
                }

            }
            break;
View Full Code Here

    }
    else {
      PortletSession session = getSession(false);
      if (session != null) {
        if (scope == SCOPE_GLOBAL_SESSION) {
          session.removeAttribute(name, PortletSession.APPLICATION_SCOPE);
          this.globalSessionAttributesToUpdate.remove(name);
        }
        else {
          session.removeAttribute(name);
          this.sessionAttributesToUpdate.remove(name);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.