Package javax.faces.context

Examples of javax.faces.context.PartialResponseWriter.startDocument()


        //http://support.microsoft.com/kb/234067
        externalContext.addResponseHeader("Expires", "-1");

        try
        {
            writer.startDocument();
            inDocument = true;
            _facesContext.setResponseWriter(writer);

            if (pvc.isRenderAll())
            {
View Full Code Here


                            {
                                Writer writer = httpResp.getWriter();
                                // can't use facesContext.getResponseWriter(), because it might not have been set
                                ResponseWriter responseWriter = new HtmlResponseWriterImpl(writer, "text/xml", "utf-8");
                                PartialResponseWriter partialWriter = new PartialResponseWriter(responseWriter);
                                partialWriter.startDocument();
                                partialWriter.startError(ex.getClass().getName());
                                if (ex.getCause() != null)
                                {
                                    partialWriter.write(ex.getCause().toString());
                                }
View Full Code Here

        //http://support.microsoft.com/kb/234067
        externalContext.addResponseHeader("Expires", "-1");

        try
        {
            writer.startDocument();
            inDocument = true;
            _facesContext.setResponseWriter(writer);

            if (pvc.isRenderAll())
            {
View Full Code Here

        {
            PartialResponseWriter writer = partialViewContext.getPartialResponseWriter();
            this.setResponseContentType("text/xml");
            this.setResponseCharacterEncoding("UTF-8");
            this.addResponseHeader("Cache-control", "no-cache");
            writer.startDocument();
            writer.redirect(url);
            writer.endDocument();
            facesContext.responseComplete();
        }
        else if (_servletResponse instanceof HttpServletResponse)
View Full Code Here

        {
            PartialResponseWriter writer = partialViewContext.getPartialResponseWriter();
            this.setResponseContentType("text/xml");
            this.setResponseCharacterEncoding("UTF-8");
            this.addResponseHeader("Cache-control", "no-cache");
            writer.startDocument();
            writer.redirect(url);
            writer.endDocument();
            facesContext.responseComplete();
        }
        else if (_servletResponse instanceof HttpServletResponse)
View Full Code Here

                externalContext.setResponseCharacterEncoding("UTF-8");
                externalContext.addResponseHeader("Cache-control", "no-cache");
               
                try
                {
                    partialWriter.startDocument();
   
                    for (Throwable t : throwableList)
                    {
                        renderAjaxError(partialWriter, t);
                    }
View Full Code Here

        //http://support.microsoft.com/kb/234067
        externalContext.addResponseHeader("Expires", "-1");

        try
        {
            writer.startDocument();
            inDocument = true;
            _facesContext.setResponseWriter(writer);

            if (pvc.isRenderAll())
            {
View Full Code Here

                externalContext.setResponseCharacterEncoding("UTF-8");
                externalContext.addResponseHeader("Cache-control", "no-cache");
               
                try
                {
                    partialWriter.startDocument();
   
                    for (Throwable t : throwableList)
                    {
                        renderAjaxError(partialWriter, t);
                    }
View Full Code Here

                ctx.setResponseWriter(writer);

                ExternalContext exContext = ctx.getExternalContext();
                exContext.setResponseContentType("text/xml");
                exContext.addResponseHeader("Cache-Control", "no-cache");
                writer.startDocument();
                if (isRenderAll()) {
                    renderAll(ctx, viewRoot);
                    renderState(ctx);
                    writer.endDocument();
                    return;
View Full Code Here

                pwriter = ctx.getPartialViewContext().getPartialResponseWriter();
            }
            setResponseContentType("text/xml");
            setResponseCharacterEncoding("UTF-8");
            addResponseHeader("Cache-Control", "no-cache");
            pwriter.startDocument();
            pwriter.redirect(requestURI);
            pwriter.endDocument();
        } else {
            ((HttpServletResponse) response).sendRedirect(requestURI);
        }
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.