Package org.apache.myfaces.trinidad.util

Examples of org.apache.myfaces.trinidad.util.RequestStateMap


   * @see org.apache.myfaces.trinidad.config.Configurator#endRequest(javax.faces.context.ExternalContext)
   */
  @Override
  public void endRequest(ExternalContext ec)
  {
    RequestStateMap state = RequestStateMap.getInstance(ec);

    // do per virtual-request stuff
    if (state.get(_REQUEST_TYPE) != null)
    {
      if (!_isDisabled(ec))
      {
        try
        {
          //Only end services at the end of a writable response.  This will
          //generally be RENDER, RESOURCE, and SERVLET.
          if (ExternalContextUtils.isResponseWritable(ec))
          {
            _endConfiguratorServiceRequest(ec);
          }
        }
        finally
        {
          state.saveState(ec);
          _releaseRequestContext(ec);
        }
      }
      state.remove(_REQUEST_TYPE);
    }
  }
View Full Code Here


   * @return a decorated ExternalContext object
   */
  @Override
  public ExternalContext getExternalContext(ExternalContext ec)
  {
    RequestStateMap state = RequestStateMap.getInstance(ec);
    RequestType type = (RequestType) state.get(_REQUEST_TYPE);

    if (type == null)
    {
      beginRequest(ec);
      type = (RequestType) state.get(_REQUEST_TYPE);
    }
    else if (!ExternalContextUtils.getRequestType(ec).equals(type))
    {
      throw new IllegalStateException("The expected request type is not the same as the current request type.");
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.util.RequestStateMap

Copyright © 2018 www.massapicom. 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.