Examples of HtmlResponseWriter


Examples of org.apache.myfaces.tobago.internal.webapp.HtmlResponseWriter

        stringWriter.toString());
  }

  @Test
  public void testNonUtf8() throws IOException {
    final TobagoResponseWriter writer1 = new HtmlResponseWriter(stringWriter, "", "ISO-8859-1");
    writer1.startElement(HtmlElements.INPUT, null);
    writer1.writeAttribute(HtmlAttributes.VALUE, "Gutschein über 100 €.", null);
    writer1.writeAttribute(HtmlAttributes.READONLY, true);
    writer1.endElement(HtmlElements.INPUT);
    writer1.close();
    Assert.assertEquals("<input value='Gutschein &uuml;ber 100 &euro;.' readonly='readonly'\n>",
        stringWriter.toString());
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.webapp.HtmlResponseWriter

    TobagoResponseWriter responseWriter;
    if (xml) {
      responseWriter = new XmlResponseWriter(writer, contentType, characterEncoding);
    } else {
      responseWriter = new HtmlResponseWriter(writer, contentType, characterEncoding);
    }
    if (TobagoConfig.getInstance(facesContext).getProjectStage() == ProjectStage.Development) {
      responseWriter = new DebugResponseWriterWrapper(responseWriter);
    }
    return responseWriter;
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.webapp.HtmlResponseWriter

  private TobagoResponseWriter writer;

  @Before
  public void setUp() throws Exception {
    stringWriter = new StringWriter();
    writer = new HtmlResponseWriter(stringWriter, "", "UTF-8");
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.webapp.HtmlResponseWriter

        stringWriter.toString());
  }

  @Test
  public void testNonUtf8() throws IOException {
    TobagoResponseWriter writer1 = new HtmlResponseWriter(stringWriter, "", "ISO-8859-1");
    writer1.startElement(HtmlElements.INPUT, null);
    writer1.writeAttribute(HtmlAttributes.VALUE, "Gutschein über 100 €.", null);
    writer1.writeAttribute(HtmlAttributes.READONLY, true);
    writer1.endElement(HtmlElements.INPUT);
    writer1.close();
    Assert.assertEquals("<input value=\"Gutschein &uuml;ber 100 &euro;.\" readonly=\"readonly\"\n>",
        stringWriter.toString());
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.webapp.HtmlResponseWriter

  private TobagoResponseWriter writer;

  @Before
  public void setUp() throws Exception {
    stringWriter = new StringWriter();
    writer = new HtmlResponseWriter(stringWriter, "", "UTF-8");
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.webapp.HtmlResponseWriter

        stringWriter.toString());
  }

  @Test
  public void testNonUtf8() throws IOException {
    TobagoResponseWriter writer1 = new HtmlResponseWriter(stringWriter, "", "ISO-8859-1");
    writer1.startElement(HtmlElements.INPUT, null);
    writer1.writeAttribute(HtmlAttributes.VALUE, "Gutschein über 100 €.", null);
    writer1.writeAttribute(HtmlAttributes.READONLY, true);
    writer1.endElement(HtmlElements.INPUT);
    writer1.close();
    Assert.assertEquals("<input value=\"Gutschein &uuml;ber 100 &euro;.\" readonly=\"readonly\"\n>",
        stringWriter.toString());
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.webapp.HtmlResponseWriter

    TobagoResponseWriter responseWriter;
    if (xml) {
      responseWriter = new XmlResponseWriter(writer, contentType, characterEncoding);
    } else {
      responseWriter = new HtmlResponseWriter(writer, contentType, characterEncoding);
    }
    if (TobagoConfig.getInstance(facesContext).getProjectStage() == ProjectStage.Development) {
      responseWriter = new DebugResponseWriterWrapper(responseWriter);
    }
    return responseWriter;
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.io.HtmlResponseWriter

        rw = new XhtmlResponseWriter(writer, contentType, characterEncoding);
      }
      else
      {
        assert _HTML_MIME_TYPE.equals(contentType);
        rw = new HtmlResponseWriter(writer, characterEncoding);
      }

      return _addDebugResponseWriters(rw);
    }
    catch (IOException ioe)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.io.HtmlResponseWriter

        rw = new XhtmlResponseWriter(writer, contentType, characterEncoding);
      }
      else
      {
        assert _HTML_MIME_TYPE.equals(contentType);
        rw = new HtmlResponseWriter(writer, characterEncoding);
      }
     
      // mstarets - PPRResponseWriter will be created in the PartialViewContextImpl
      // for both the JSF2-style ajax requests and legacy requests
     
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.io.HtmlResponseWriter

        rw = new XhtmlResponseWriter(writer, contentType, characterEncoding);
      }
      else
      {
        assert _HTML_MIME_TYPE.equals(contentType);
        rw = new HtmlResponseWriter(writer, characterEncoding);
      }
     
      // JIRA 2107 - jsf.js cannot handle HTML comments in the <update> element, so we need to suppress debug output
      // if we are generating response that will be handled by JSF2.0 Ajax
      if (_isJsf2Ajax(fContext.getExternalContext()))
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.