Package org.apache.myfaces.tobago.internal.webapp

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


  @Test
  public void test() throws IOException {

    StringWriter stringWriter = new StringWriter();
    getFacesContext().setResponseWriter(new XmlResponseWriter(stringWriter, "text/xml", "ISO-8859-1"));

    DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root");
    DefaultMutableTreeNode colors = new DefaultMutableTreeNode("Colors");
    DefaultMutableTreeNode numbers = new DefaultMutableTreeNode("Numbers");
    DefaultMutableTreeNode integers = new DefaultMutableTreeNode("Integers");
View Full Code Here


      contentType = "text/html";
    }

    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);
View Full Code Here

        stringWriter.toString());
  }

  @Test
  public void testCharArray() throws IOException {
    TobagoResponseWriter writer = new XmlResponseWriter(stringWriter, "text/xml", "ISO-8859-1");
    writer.writeText("123".toCharArray(), 0, 3);
    Assert.assertEquals("123", stringWriter.toString());
  }
View Full Code Here

        stringWriter.toString());
  }

  @Test
  public void testCharArray() throws IOException {
    TobagoResponseWriter writer = new XmlResponseWriter(stringWriter, "text/xml", "ISO-8859-1");
    writer.writeText("123".toCharArray(), 0, 3);
    Assert.assertEquals("123", stringWriter.toString());
  }
View Full Code Here

      contentType = "text/html";
    }

    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);
View Full Code Here

      contentType = "text/html";
    }

    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);
View Full Code Here

  @Test
  public void test() throws IOException {

    final StringWriter stringWriter = new StringWriter();
    getFacesContext().setResponseWriter(new XmlResponseWriter(stringWriter, "text/xml", "ISO-8859-1"));

    final DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root");
    final DefaultMutableTreeNode colors = new DefaultMutableTreeNode("Colors");
    final DefaultMutableTreeNode numbers = new DefaultMutableTreeNode("Numbers");
    final DefaultMutableTreeNode integers = new DefaultMutableTreeNode("Integers");
View Full Code Here

      contentType = "text/html";
    }

    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);
View Full Code Here

      contentType = "text/html";
    }

    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);
View Full Code Here

        stringWriter.toString());
  }

  @Test
  public void testCharArray() throws IOException {
    final TobagoResponseWriter writer = new XmlResponseWriter(stringWriter, "text/xml", "ISO-8859-1");
    writer.writeText("123".toCharArray(), 0, 3);
    Assert.assertEquals("123", stringWriter.toString());
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.internal.webapp.XmlResponseWriter

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.