Package org.apache.myfaces.shared_impl.renderkit.html

Examples of org.apache.myfaces.shared_impl.renderkit.html.HtmlResponseWriterImpl


                            httpResp.setContentType("text/xml; charset=UTF-8");
                            try
                            {
                                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)
                                {
View Full Code Here


        if(characterEncoding==null)
        {
            characterEncoding = HtmlRendererUtils.DEFAULT_CHAR_ENCODING;
        }

        return new HtmlResponseWriterImpl(writer, selectedContentType, characterEncoding);
    }
View Full Code Here

        if(characterEncoding==null)
        {
            characterEncoding = HtmlRendererUtils.DEFAULT_CHAR_ENCODING;
        }

        return new HtmlResponseWriterImpl(writer, selectedContentType, characterEncoding);
    }
View Full Code Here

                            httpResp.setContentType("text/xml; charset=UTF-8");
                            try
                            {
                                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)
                                {
View Full Code Here

        if (characterEncoding == null)
        {
            characterEncoding = HtmlRendererUtils.DEFAULT_CHAR_ENCODING;
        }

        return new HtmlResponseWriterImpl(writer, selectedContentType, characterEncoding,
                MyfacesConfig.getCurrentInstance(
                        FacesContext.getCurrentInstance().getExternalContext()).isWrapScriptContentWithXmlCommentTag());
    }
View Full Code Here

        //root.setViewId("viewMetadata.xhtml");
        vdl.buildView(facesContext, root, "viewMetadata.xhtml");
        facesContext.setViewRoot(root);
       
        StringWriter sw = new StringWriter();
        ResponseWriter mrw = new HtmlResponseWriterImpl(sw,"text/html","UTF-8");
        facesContext.setResponseWriter(mrw);
       
        root.encodeAll(facesContext);
        sw.flush();
        System.out.print(sw.toString());
View Full Code Here

    @Override
    protected void setUpJSFObjects() throws Exception
    {
        super.setUpJSFObjects();
        outputWriter = new FastWriter();
        writer = new HtmlResponseWriterImpl(outputWriter, null, null);
        facesContext.setResponseWriter(writer);
        facesContext.getAttributes().put("org.apache.myfaces.RENDERED_JSF_JS", true);
    }
View Full Code Here

     * creates a new test probe (aka response writer)
     *
     * @return
     */
    private PartialResponseWriterImpl createTestProbe() {
        return new PartialResponseWriterImpl(new HtmlResponseWriterImpl(_contentCollector, null, "UTF-8"));
    }
View Full Code Here

        for (String contentType: CONTENT_TYPES)
        {
            for (String encoding : ENCODINGS)
            {
                StringWriter swriter = new StringWriter();
                HtmlResponseWriterImpl writer = new HtmlResponseWriterImpl(swriter, contentType , encoding);
                facesContext.setResponseWriter(writer);
                // note if appear a &, the & is escaped too,
                // but when you see the output in a html browser
                // the output it the same.
                outputText.setValue(TEST_STRING);
View Full Code Here

        for (String contentType: CONTENT_TYPES)
        {
            for (String encoding : ENCODINGS)
            {
                StringWriter swriter = new StringWriter();
                HtmlResponseWriterImpl writer = new HtmlResponseWriterImpl(swriter, contentType , encoding);
                facesContext.setResponseWriter(writer);
                outputText.setValue(TEST_STRING);
                outputText.setEscape(false);
                outputText.encodeEnd(facesContext);
                facesContext.renderResponse();
View Full Code Here

TOP

Related Classes of org.apache.myfaces.shared_impl.renderkit.html.HtmlResponseWriterImpl

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.