commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wer...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly TagSupport.java
Date Tue, 20 Aug 2002 05:02:51 GMT
werken      2002/08/19 22:02:51

  Modified:    jelly/src/java/org/apache/commons/jelly TagSupport.java
  Log:
  Adding parameterized version of getBodyText() to allow for explicitly
  setting escape/unescape mode.  Should we actually inherit from.. where?
  
  Revision  Changes    Path
  1.17      +20 -5     jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/TagSupport.java
  
  Index: TagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/TagSupport.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TagSupport.java	26 Jun 2002 09:43:31 -0000	1.16
  +++ TagSupport.java	20 Aug 2002 05:02:51 -0000	1.17
  @@ -212,6 +212,21 @@
           return writer.toString();
       }
   
  +    /**
  +     * Evaluates the given body using a buffer and returns the String 
  +     * of the result.
  +     *
  +     * @param shouldEscape Signal if the text should be escaped.
  +     *
  +     * @return the text evaluation of the body
  +     */
  +    protected String getBodyText(boolean shouldEscape) throws Exception {
  +        StringWriter writer = new StringWriter();
  +        invokeBody(XMLOutput.createXMLOutput(writer,shouldEscape));
  +        return writer.toString();
  +    }
  +
  +
       /** 
        * Find all text nodes inside the top level of this body and 
        * if they are just whitespace then remove them
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message