Examples of BodyContentImpl


Examples of com.caucho.jsp.BodyContentImpl

      JspWriter out = pc.getOut();

      NumberFormat format = getFormat();

      Double rawValue = null;
      BodyContentImpl body = (BodyContentImpl) getBodyContent();

      if (_hasValue)
        rawValue = _value;
      else if (body != null) {
        String value = body.getTrimString();

        if (! value.equals(""))
          rawValue = Double.parseDouble(value);
      }
View Full Code Here

Examples of com.caucho.jsp.BodyContentImpl

   
    try {
      if (_varReader != null) {
        jspWriter = pageContext.pushBody();
       
        BodyContentImpl body = (BodyContentImpl) pageContext.getOut();

        handleBody(body);
       
        _reader = body.getReader();

        pageContext.setAttribute(_varReader, _reader);

        return EVAL_BODY_INCLUDE;
      }
View Full Code Here

Examples of com.caucho.jsp.BodyContentImpl

    }
    else {
      try {
        JspWriter jspWriter = pageContext.pushBody();
         
        BodyContentImpl body = (BodyContentImpl) pageContext.getOut();

        handleBody(body);

        if (_var != null) {
          String value = body.getString();

          pageContext.popBody();

          CoreSetTag.setValue(pageContext, _var, _scope, value);
        }
        else {
          body.writeOut(body.getEnclosingWriter());

          pageContext.popBody();
        }
      } catch (JspException e) {
        throw e;
View Full Code Here

Examples of com.caucho.jsp.BodyContentImpl

  public int doEndTag() throws JspException
  {
    try {
      PageContextImpl pageContext = (PageContextImpl) this.pageContext;
      BodyContentImpl body = (BodyContentImpl) getBodyContent();

      XMLReader xmlReader = null;
      Reader reader = null;
      InputSource is;

      if (_xml != null) {
        Object obj = _xml;

        if (obj instanceof Reader) {
          reader = (Reader) obj;

          is = new InputSource(reader);
        }
        else if (obj instanceof String) {
          reader = Vfs.openString((String) obj).getReader();

          is = new InputSource(reader);
        } else if (obj instanceof XMLReader) {
          xmlReader = (XMLReader) obj;

          is = new InputSource();
        }
        else
          throw new JspException(L.l("xml must be java.io.Reader, String or org.xml.sax.XMLReader at `{0}'",
                                     obj));
      }
      else if (body != null) {
        TempCharReader tempReader = (TempCharReader) body.getReader();
        int ch;

        while (Character.isWhitespace((ch = tempReader.read()))) {
        }
View Full Code Here

Examples of com.caucho.jsp.BodyContentImpl

    try {
      PageContextImpl pageContext = (PageContextImpl) this.pageContext;
     
      JspWriter out = pageContext.getOut();
     
      BodyContentImpl body = (BodyContentImpl) getBodyContent();

      if (body != null) {
        String s = body.getString().trim();

        if (_escapeXml)
          Expr.toStreamEscaped(out, s);
        else
          out.print(s);
View Full Code Here

Examples of com.caucho.jsp.BodyContentImpl

     
      JspWriter out = pageContext.getOut();

      double number;

      BodyContentImpl body = (BodyContentImpl) getBodyContent();

      if (_valueExpr != null)
        number = _valueExpr.evalDouble(env);
      else if (body != null) {
        String value = body.getTrimString();

        if (! value.equals(""))
          number = Double.parseDouble(value);
        else
          number = 0.0;
View Full Code Here

Examples of com.caucho.jsp.BodyContentImpl

      PageContextImpl pageContext = (PageContextImpl) this.pageContext;
      ELContext env = pageContext.getELContext();
     
      JspWriter out = pageContext.getOut();
     
      BodyContentImpl body = (BodyContentImpl) getBodyContent();

      if (body != null) {
        boolean doEscape = (_escapeXml == null || _escapeXml.evalBoolean(env));

        String s = body.getString().trim();

        if (doEscape)
          Expr.toStreamEscaped(out, s);
        else
          out.print(s);
View Full Code Here

Examples of com.caucho.jsp.BodyContentImpl

  public int doEndTag() throws JspException
  {
    try {
      PageContextImpl pageContext = (PageContextImpl) this.pageContext;
      BodyContentImpl body = (BodyContentImpl) getBodyContent();

      Reader reader;

      if (_xml != null) {
        Object obj = _xml.evalObject(pageContext.getELContext());

        if (obj instanceof Reader)
          reader = (Reader) obj;
        else if (obj instanceof String)
          reader = Vfs.openString((String) obj).getReader();
        else
          throw new JspException(L.l("'doc' attribute must be a Reader or String at `{0}'",
                                     obj));
      }
      else if (body != null) {
        TempCharReader tempReader = (TempCharReader) body.getReader();
        int ch;

        while (Character.isWhitespace((ch = tempReader.read()))) {
        }
View Full Code Here

Examples of com.caucho.jsp.BodyContentImpl

      if (_varReader != null) {
        jspWriter = pageContext.pushBody();
       
        handleBody();

        BodyContentImpl body = (BodyContentImpl) pageContext.getOut();

        _reader = body.getReader();

        pageContext.setAttribute(_varReader, _reader);

        return EVAL_BODY_INCLUDE;
      }
View Full Code Here

Examples of com.caucho.jsp.BodyContentImpl

      try {
        JspWriter jspWriter = pageContext.pushBody();
         
        handleBody();

        BodyContentImpl body = (BodyContentImpl) pageContext.getOut();

        if (_var != null) {
          String value = body.getString();

          pageContext.popBody();

          CoreSetTag.setValue(pageContext, _var, _scope, value);
        }
        else {
          body.writeOut(body.getEnclosingWriter());

          pageContext.popBody();
        }
      } catch (JspException e) {
        throw e;
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.