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

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


        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.
                outputLabel.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);
                outputLabel.setValue(TEST_STRING);
                outputLabel.setEscape(false);
                outputLabel.encodeAll(facesContext);
                facesContext.renderResponse();
View Full Code Here

    }
   
    public void tryUISelectEscapeValue(UIComponent component, String contentType, String encoding) throws Exception
    {
        StringWriter swriter = new StringWriter();
        HtmlResponseWriterImpl writer = new HtmlResponseWriterImpl(swriter, contentType , encoding);
        facesContext.setResponseWriter(writer);
        UISelectItem uiSelectItem = new UISelectItem();
        SelectItem item = new SelectItem("Output",TEST_STRING,"",false,true);
        uiSelectItem.setValue(item);
        component.getChildren().add(uiSelectItem);
View Full Code Here

    }
   
    public void tryUISelectNoEscapeValue(UIComponent component, String contentType, String encoding) throws Exception
    {
        StringWriter swriter = new StringWriter();
        HtmlResponseWriterImpl writer = new HtmlResponseWriterImpl(swriter, contentType , encoding);
        facesContext.setResponseWriter(writer);
        UISelectItem uiSelectItem = new UISelectItem();
        SelectItem item = new SelectItem("Output",TEST_STRING,"",false,false);
        uiSelectItem.setValue(item);
        component.getChildren().add(uiSelectItem);
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

                            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

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.