Package javax.portlet

Examples of javax.portlet.PortletSession.removeAttribute()


    {
       PortletSession session = request.getPortletSession();
       session.setAttribute(REDEPLOY_FLAG, "portlet was not redeployed");
       FacesContext context = FacesContext.getCurrentInstance();
       if (context != null) context.release();
       session.removeAttribute(this.CURRENT_FACES_CONTEXT);
    }

    /**
     * This method follows JSF Spec section 2.1.1.  It renders the default view from a non-faces
     * request.
 
View Full Code Here


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

    protected Enumeration getAttributeNames()
    {
View Full Code Here

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

    protected Enumeration getAttributeNames()
    {
View Full Code Here

    // in this request. If it turns out that we need to show the form view again,
    // we'll re-bind the form object to the portlet session.
    if (logger.isDebugEnabled()) {
      logger.debug("Removing form session attribute [" + formAttrName + "]");
    }
    session.removeAttribute(formAttrName);

    // Check the command object to make sure its valid
    if (!checkCommand(sessionFormObject)) {
      throw new PortletSessionRequiredException("Object found in session does not match commandClass");
    }
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

    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

      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

    // in this request. If it turns out that we need to show the form view again,
    // we'll re-bind the form object to the portlet session.
    if (logger.isDebugEnabled()) {
      logger.debug("Removing form session attribute [" + formAttrName + "]");
    }
    session.removeAttribute(formAttrName);

    // Check the command object to make sure its valid
    if (!checkCommand(sessionFormObject)) {
      throw new PortletSessionRequiredException("Object found in session does not match commandClass");
    }
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.