Examples of FastStringWriter


Examples of org.apache.myfaces.tobago.internal.util.FastStringWriter

    if (!FacesContextUtils.isAjax(facesContext)) {
      if (FacesVersion.supports12()) {
        viewHandler.writeState(facesContext);
      } else {
        // catch the next written stuff into a string and look if it is empty (TOBAGO-909)
        FastStringWriter buffer = new FastStringWriter(40); // usually only the marker...
        TobagoResponseWriter originalWriter = (TobagoResponseWriter) facesContext.getResponseWriter();
        writer = (TobagoResponseWriter) writer.cloneWithWriter(buffer);
        facesContext.setResponseWriter(writer);
        viewHandler.writeState(facesContext);
        final String stateContent = buffer.toString();
        writer = originalWriter;
        facesContext.setResponseWriter(writer);

        if (StringUtils.isBlank(stateContent)) {
          if (LOG.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.util.FastStringWriter

    if (!FacesContextUtils.isAjax(facesContext)) {
      if (FacesVersion.supports12()) {
        viewHandler.writeState(facesContext);
      } else {
        // catch the next written stuff into a string and look if it is empty (TOBAGO-909)
        FastStringWriter buffer = new FastStringWriter(40); // usually only the marker...
        TobagoResponseWriter originalWriter = (TobagoResponseWriter) facesContext.getResponseWriter();
        writer = (TobagoResponseWriter) writer.cloneWithWriter(buffer);
        facesContext.setResponseWriter(writer);
        viewHandler.writeState(facesContext);
        final String stateContent = buffer.toString();
        writer = originalWriter;
        facesContext.setResponseWriter(writer);

        if (StringUtils.isBlank(stateContent)) {
          if (LOG.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.util.FastStringWriter

    if (!FacesContextUtils.isAjax(facesContext)) {
      if (FacesVersion.supports12()) {
        viewHandler.writeState(facesContext);
      } else {
        // catch the next written stuff into a string and look if it is empty (TOBAGO-909)
        FastStringWriter buffer = new FastStringWriter(40); // usually only the marker...
        TobagoResponseWriter originalWriter = (TobagoResponseWriter) facesContext.getResponseWriter();
        writer = (TobagoResponseWriter) writer.cloneWithWriter(buffer);
        facesContext.setResponseWriter(writer);
        viewHandler.writeState(facesContext);
        final String stateContent = buffer.toString();
        writer = originalWriter;
        facesContext.setResponseWriter(writer);

        if (StringUtils.isBlank(stateContent)) {
          if (LOG.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.util.FastStringWriter

  private JavascriptWriterUtils encodeInJavascriptBlock;
  private JavascriptWriterUtils encodeOutsideJavascriptBlock;

  public JsonResponseWriter(Writer writer, String contentType, String characterEncoding) {
    super(writer, contentType, characterEncoding);
    this.javascriptWriter = new FastStringWriter();
    this.encodeOutsideJavascriptBlock = new JavascriptWriterUtils(writer, characterEncoding);
    this.encodeInJavascriptBlock = new JavascriptWriterUtils(javascriptWriter, characterEncoding);
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.util.FastStringWriter

    assert writers.size() == buffers.size();

    boolean created = true;
    current++;
    if (writers.size() == current) {
      FastStringWriter buffer = new FastStringWriter();
      buffers.add(buffer);
      ResponseWriter newWriter = facesContext.getResponseWriter().cloneWithWriter(buffer);
      writers.add(newWriter);
      created = false;
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.util.FastStringWriter

    if ("application/json".equals(contentType)) {
      this.helper = new JsonWriterUtils(writer, characterEncoding);
    } else {
      this.helper = new HtmlWriterUtils(writer, characterEncoding);
    }
    this.javascriptWriter = new FastStringWriter();
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.util.FastStringWriter

    if (!FacesContextUtils.isAjax(facesContext)) {
      if (FacesVersion.supports12()) {
        viewHandler.writeState(facesContext);
      } else {
        // catch the next written stuff into a string and look if it is empty (TOBAGO-909)
        FastStringWriter buffer = new FastStringWriter(40); // usually only the marker...
        TobagoResponseWriter originalWriter = (TobagoResponseWriter) facesContext.getResponseWriter();
        writer = (TobagoResponseWriter) writer.cloneWithWriter(buffer);
        facesContext.setResponseWriter(writer);
        viewHandler.writeState(facesContext);
        final String stateContent = buffer.toString();
        writer = originalWriter;
        facesContext.setResponseWriter(writer);

        if (StringUtils.isBlank(stateContent)) {
          if (LOG.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.util.FastStringWriter

    if (!FacesContextUtils.isAjax(facesContext)) {
      if (FacesVersion.supports12()) {
        viewHandler.writeState(facesContext);
      } else {
        // catch the next written stuff into a string and look if it is empty (TOBAGO-909)
        FastStringWriter buffer = new FastStringWriter(40); // usually only the marker...
        TobagoResponseWriter originalWriter = (TobagoResponseWriter) facesContext.getResponseWriter();
        writer = (TobagoResponseWriter) writer.cloneWithWriter(buffer);
        facesContext.setResponseWriter(writer);
        viewHandler.writeState(facesContext);
        final String stateContent = buffer.toString();
        writer = originalWriter;
        facesContext.setResponseWriter(writer);

        if (StringUtils.isBlank(stateContent)) {
          if (LOG.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.util.FastStringWriter

  private Writer javascriptWriter;
  private boolean javascriptMode;

  public JsonResponseWriter(Writer writer, String contentType, String characterEncoding) {
    super(writer, contentType, characterEncoding);
    this.javascriptWriter = new FastStringWriter();
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.util.FastStringWriter

    assert writers.size() == buffers.size();

    boolean created = true;
    current++;
    if (writers.size() == current) {
      FastStringWriter buffer = new FastStringWriter();
      buffers.add(buffer);
      ResponseWriter newWriter = facesContext.getResponseWriter().cloneWithWriter(buffer);
      writers.add(newWriter);
      created = false;
    }
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.