Examples of requiresBuffer()


Examples of org.apache.myfaces.renderkit.html.util.AddResource.requiresBuffer()

            //org.apache.myfaces.renderkit.html.util.DefaultAddResource
            //Buffers the output and add to the header the necessary stuff
            //In other case this is simply ignored (NonBufferingAddResource and
            //StreamingAddResource), because this not require buffering
            //and the chaining continues.
            if (addResource.requiresBuffer())
            {
                ExtensionsResponseWrapper extendedResponse = new ExtensionsResponseWrapper((HttpServletResponse) response);
       
                // Standard request
                chain.doFilter(extendedRequest, extendedResponse);
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.AddResource.requiresBuffer()

    protected void writeBeforeEnd(FacesContext facesContext) throws IOException
    {
        super.writeBeforeEnd(facesContext);
       
        AddResource addResource = AddResourceFactory.getInstance(facesContext);
        if (!addResource.requiresBuffer())
        {
            // This code is rendered only if this request don't require
            // buffering, because when it is buffered, the buffer is responsible
            // of render it.
            ExtensionsPhaseListener.writeCodeBeforeBodyEnd(facesContext);
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.AddResource.requiresBuffer()

            else
            {
                addResource.responseStarted();
            }

            if (addResource.requiresBuffer())
            {
                throw new IllegalStateException("buffering not supported in the portal environment. "+
                        " Use for org.apache.myfaces.ADD_RESOURCE_CLASS the value"+
                        " org.apache.myfaces.renderkit.html.util.NonBufferingAddResource.");
            }
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.AddResource.requiresBuffer()

            else
            {
                addResource.responseStarted();
            }

            if (addResource.requiresBuffer() && extensionsResponseWrapper != null)
            {
                //If the request requires buffer, this was already
                //wrapped (on TomahawkFacesContextFactory.getFacesContext(...) ),
                //but we need to save the wrapped response value
                //on a local variable to then reference it on release()
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.AddResource.requiresBuffer()

        AddResource addResource=null;

        try
        {
            addResource= AddResourceFactory.getInstance(this);
            if (addResource.requiresBuffer())
            {
                if(extensionsResponseWrapper == null) {
                    throw new NullPointerException("When wrapping the faces-context, add-resource told us that no buffer is required, " +
                            "now it is required, and we have a null-extensionsResponseWrapper. Please fix add-resource to be consistent over a single request.");
                }
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.AddResource.requiresBuffer()

            //org.apache.myfaces.renderkit.html.util.DefaultAddResource
            //Buffers the output and add to the header the necessary stuff
            //In other case this is simply ignored (NonBufferingAddResource and
            //StreamingAddResource), because this not require buffering
            //and the chaining continues.
            if (addResource.requiresBuffer())
            {
                ExtensionsResponseWrapper extendedResponse = new ExtensionsResponseWrapper((HttpServletResponse) response);
       
                // Standard request
                chain.doFilter(extendedRequest, extendedResponse);
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.AddResource.requiresBuffer()

                //constructor, because the delegate ExternalContext do
                //calls like dispatch, forward and redirect, that requires
                //the wrapped response instance to work properly.           
                AddResource addResource = AddResourceFactory.getInstance((HttpServletRequest)request,(ServletContext)context);
               
                if (addResource.requiresBuffer())
                {
                    ExtensionsResponseWrapper extensionsResponseWrapper = new ExtensionsResponseWrapper((HttpServletResponse)response);
                    return new TomahawkFacesContextWrapper(delegate.getFacesContext(context, request, extensionsResponseWrapper, lifecycle),
                            extensionsResponseWrapper);
                }
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.AddResource.requiresBuffer()

            }
           
            AddResource addResource= AddResourceFactory.getInstance(this);
            addResource.responseStarted();

            if (addResource.requiresBuffer())
            {
                throw new IllegalStateException("buffering not supported in the portal environment. "+
                        " Use for org.apache.myfaces.ADD_RESOURCE_CLASS the value"+
                        " org.apache.myfaces.renderkit.html.util.NonBufferingAddResource.");
            }
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.AddResource.requiresBuffer()

            }

            AddResource addResource= AddResourceFactory.getInstance(this);
            addResource.responseStarted();

            if (addResource.requiresBuffer() && extensionsResponseWrapper != null)
            {
                //If the request requires buffer, this was already
                //wrapped (on TomahawkFacesContextFactory.getFacesContext(...) ),
                //but we need to save the wrapped response value
                //on a local variable to then reference it on release()
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.AddResource.requiresBuffer()

        AddResource addResource=null;

        try
        {
            addResource= AddResourceFactory.getInstance(this);
            if (addResource.requiresBuffer())
            {
                if(extensionsResponseWrapper == null) {
                    throw new NullPointerException("When wrapping the faces-context, add-resource told us that no buffer is required, " +
                            "now it is required, and we have a null-extensionsResponseWrapper. Please fix add-resource to be consistent over a single request.");
                }
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.