commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ojb BrokerTag.java
Date Wed, 26 Jun 2002 09:24:37 GMT
jstrachan    2002/06/26 02:24:36

  Modified:    jelly/src/java/org/apache/commons/jelly/tags/ant
                        DataTypeTag.java TaskTag.java OtherAntTag.java
                        FileScannerTag.java
               jelly/src/java/org/apache/commons/jelly/tags/werkz
                        ProjectTag.java GoalTag.java AttainTag.java
                        PostActionTag.java AttainGoalTag.java
                        PreGoalTag.java PreActionTag.java PostGoalTag.java
               jelly/src/java/org/apache/commons/jelly/tags/jms
                        SendTag.java ConnectionTag.java ReceiveTag.java
               jelly/src/java/org/apache/commons/jelly/tags/core
                        WhitespaceTag.java JellyTag.java ForEachTag.java
                        OtherwiseTag.java IfTag.java WhenTag.java
               jelly/src/java/org/apache/commons/jelly/tags/xml
                        ElementTag.java ParseTag.java ForEachTag.java
                        IfTag.java
               jelly/src/java/org/apache/commons/jelly/impl StaticTag.java
               jelly/src/java/org/apache/commons/jelly/tags/jsl
                        StylesheetTag.java TemplateTag.java
               jelly/src/java/org/apache/commons/jelly/tags/define
                        InvokeBodyTag.java DefineTagLibTag.java
               jelly/src/java/org/apache/commons/jelly/tags/validate
                        ValidateTag.java
               jelly/src/java/org/apache/commons/jelly/tags/http
                        MethodSupportTag.java
               jelly/src/java/org/apache/commons/jelly/tags/sql
                        TransactionTag.java
               jelly/src/java/org/apache/commons/jelly TagSupport.java
               jelly/src/java/org/apache/commons/jelly/tags/ojb
                        BrokerTag.java
  Log:
  Patched code to use the invokeBody(output) method instead of the getBody().run(context,
output) mechanism.
  This allows us to put common whitespace trimming code inside the invokeBody() method as
well as isolating us from the Script interface, which going forward might change a little
bit to, for example, pass the parent Tag into child TagScripts, so that Tag instances can
stay on the stack, in local threads, for multi threaded server applications.
  
  Revision  Changes    Path
  1.10      +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/DataTypeTag.java
  
  Index: DataTypeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/DataTypeTag.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DataTypeTag.java	25 Jun 2002 18:00:09 -0000	1.9
  +++ DataTypeTag.java	26 Jun 2002 09:24:34 -0000	1.10
  @@ -112,7 +112,7 @@
       public void doTag(XMLOutput output) throws Exception {
   
           // run the body first to configure any nested DataType instances
  -        getBody().run(context, output);
  +        invokeBody(output);
   
           AntTagSupport parentTag = (AntTagSupport) findAncestorWithClass( AntTagSupport.class);
   
  
  
  
  1.13      +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/TaskTag.java
  
  Index: TaskTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/TaskTag.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TaskTag.java	25 Jun 2002 20:43:30 -0000	1.12
  +++ TaskTag.java	26 Jun 2002 09:24:34 -0000	1.13
  @@ -154,7 +154,7 @@
   			Object[] args = { text };
   			method.invoke(task, args);
   		} else {
  -            getBody().run(context, output);
  +            invokeBody(output);
           }
           
           task.perform();   
  
  
  
  1.5       +2 -2      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/OtherAntTag.java
  
  Index: OtherAntTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/OtherAntTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- OtherAntTag.java	25 Jun 2002 21:02:25 -0000	1.4
  +++ OtherAntTag.java	26 Jun 2002 09:24:34 -0000	1.5
  @@ -66,12 +66,12 @@
                   Object[] args = { text };
                   method.invoke(this.task, args);
               } else {
  -                getBody().run(context, output);
  +                invokeBody(output);
               }
               
               this.task.perform(); 
           } else {
  -            getBody().run( context, output );
  +            invokeBody(output);
   
               AntTagSupport parent = (AntTagSupport) findAncestorWithClass(AntTagSupport.class);
   
  
  
  
  1.2       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/FileScannerTag.java
  
  Index: FileScannerTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/FileScannerTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileScannerTag.java	2 Jun 2002 17:29:02 -0000	1.1
  +++ FileScannerTag.java	26 Jun 2002 09:24:34 -0000	1.2
  @@ -96,7 +96,7 @@
       //------------------------------------------------------------------------- 
       public void doTag(XMLOutput output) throws Exception {
           // run the body first to configure the task via nested
  -        getBody().run(context, output);
  +        invokeBody(output);
   
           // output the fileScanner
           if ( var == null ) {
  
  
  
  1.12      +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/ProjectTag.java
  
  Index: ProjectTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/ProjectTag.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ProjectTag.java	24 Jun 2002 04:43:45 -0000	1.11
  +++ ProjectTag.java	26 Jun 2002 09:24:34 -0000	1.12
  @@ -120,7 +120,7 @@
           // allow access to Ant methods via the project class
           context.setVariable( "project", antProject );
           
  -        getBody().run(context, output);
  +        invokeBody(output);
       }
   
       public void setDefault(String defaultGoalName) {
  
  
  
  1.4       +2 -2      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/GoalTag.java
  
  Index: GoalTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/GoalTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GoalTag.java	24 Jun 2002 04:43:45 -0000	1.3
  +++ GoalTag.java	26 Jun 2002 09:24:34 -0000	1.4
  @@ -116,7 +116,7 @@
           Action action = new DefaultAction() {
                   public void performAction() throws Exception {
                       log.debug("Running action of target: " + getName() );
  -                    getBody().run(context, output);
  +                    invokeBody(output);
                   }
               };
   
  
  
  
  1.3       +2 -2      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/AttainTag.java
  
  Index: AttainTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/AttainTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AttainTag.java	12 Jun 2002 22:01:07 -0000	1.2
  +++ AttainTag.java	26 Jun 2002 09:24:35 -0000	1.3
  @@ -95,7 +95,7 @@
       public void doTag(final XMLOutput output) throws Exception {
           this.session = new JellySession( output );
           
  -        getBody().run(context, output);
  +        invokeBody(output);
       }
   
       
  
  
  
  1.2       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/PostActionTag.java
  
  Index: PostActionTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/PostActionTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PostActionTag.java	12 Jun 2002 22:09:46 -0000	1.1
  +++ PostActionTag.java	26 Jun 2002 09:24:35 -0000	1.2
  @@ -94,7 +94,7 @@
                   public void firePostAction(Goal goal) throws Exception {
                       // lets run the body
                       log.info( "Running post action: " + getName() );
  -                    getBody().run( context, output);                                  
     
  +                    invokeBody( output);                                        
                   }                
               }
           );            
  
  
  
  1.4       +2 -2      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/AttainGoalTag.java
  
  Index: AttainGoalTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/AttainGoalTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AttainGoalTag.java	12 Jun 2002 22:01:07 -0000	1.3
  +++ AttainGoalTag.java	26 Jun 2002 09:24:35 -0000	1.4
  @@ -107,7 +107,7 @@
   
           Project project = projectTag.getProject();
   
  -        getBody().run(context, output);
  +        invokeBody(output);
   
           project.attainGoal( getName(),
                               session );
  
  
  
  1.4       +2 -2      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/PreGoalTag.java
  
  Index: PreGoalTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/PreGoalTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PreGoalTag.java	12 Jun 2002 22:09:46 -0000	1.3
  +++ PreGoalTag.java	26 Jun 2002 09:24:35 -0000	1.4
  @@ -94,7 +94,7 @@
                   public void firePreGoal(Goal goal) throws Exception {
                       // lets run the body
                       log.debug( "Running pre goal: " + getName() );
  -                    getBody().run( context, output);               
  +                    invokeBody( output);               
                   }                
               }
           );            
  
  
  
  1.2       +2 -2      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/PreActionTag.java
  
  Index: PreActionTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/PreActionTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PreActionTag.java	12 Jun 2002 22:09:46 -0000	1.1
  +++ PreActionTag.java	26 Jun 2002 09:24:35 -0000	1.2
  @@ -94,7 +94,7 @@
                   public void firePreAction(Goal goal) throws Exception {
                       // lets run the body
                       log.debug( "Running pre action: " + getName() );
  -                    getBody().run( context, output);               
  +                    invokeBody( output);               
                   }                
               }
           );            
  
  
  
  1.3       +2 -2      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/PostGoalTag.java
  
  Index: PostGoalTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/PostGoalTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PostGoalTag.java	12 Jun 2002 22:09:46 -0000	1.2
  +++ PostGoalTag.java	26 Jun 2002 09:24:35 -0000	1.3
  @@ -94,7 +94,7 @@
                   public void firePostGoal(Goal goal) throws Exception {
                       // lets run the body
                       log.info( "Running post goal: " + getName() );
  -                    getBody().run( context, output);                                  
     
  +                    invokeBody( output);                                        
                   }                
               }
           );            
  
  
  
  1.3       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jms/SendTag.java
  
  Index: SendTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jms/SendTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SendTag.java	22 Jun 2002 23:54:41 -0000	1.2
  +++ SendTag.java	26 Jun 2002 09:24:35 -0000	1.3
  @@ -85,7 +85,7 @@
       //-------------------------------------------------------------------------       
            
       public void doTag(XMLOutput output) throws Exception {
           // evaluate body as it may contain a <destination> or message tag
  -        getBody().run(context, output);
  +        invokeBody(output);
           
           Message message = getMessage();
           if ( message == null ) {
  
  
  
  1.2       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jms/ConnectionTag.java
  
  Index: ConnectionTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jms/ConnectionTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConnectionTag.java	22 Jun 2002 16:55:50 -0000	1.1
  +++ ConnectionTag.java	26 Jun 2002 09:24:35 -0000	1.2
  @@ -101,7 +101,7 @@
               context.setVariable( var, connection );
           }
           
  -        getBody().run(context, output);
  +        invokeBody(output);
       }
       
       // Properties
  
  
  
  1.3       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jms/ReceiveTag.java
  
  Index: ReceiveTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jms/ReceiveTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReceiveTag.java	22 Jun 2002 23:54:41 -0000	1.2
  +++ ReceiveTag.java	26 Jun 2002 09:24:35 -0000	1.3
  @@ -84,7 +84,7 @@
       //-------------------------------------------------------------------------       
            
       public void doTag(XMLOutput output) throws Exception {
           // evaluate body as it may contain a <destination> tag
  -        getBody().run(context, output);
  +        invokeBody(output);
           
           Destination destination = getDestination();
           if ( destination == null ) {
  
  
  
  1.2       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/WhitespaceTag.java
  
  Index: WhitespaceTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/WhitespaceTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WhitespaceTag.java	13 Jun 2002 08:16:47 -0000	1.1
  +++ WhitespaceTag.java	26 Jun 2002 09:24:35 -0000	1.2
  @@ -91,7 +91,7 @@
           if ( log.isDebugEnabled() ) {
               log.debug( "Running body: " + getBody() );
           }
  -        getBody().run(context, output);
  +        invokeBody(output);
       }
   
   }
  
  
  
  1.8       +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/JellyTag.java
  
  Index: JellyTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/JellyTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JellyTag.java	12 Jun 2002 20:38:37 -0000	1.7
  +++ JellyTag.java	26 Jun 2002 09:24:35 -0000	1.8
  @@ -97,7 +97,7 @@
           if ( log.isDebugEnabled() ) {
               log.debug( "Running body: " + getBody() );
           }
  -        getBody().run(context, output);
  +        invokeBody(output);
       }
   
       // Properties
  
  
  
  1.14      +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/ForEachTag.java
  
  Index: ForEachTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/ForEachTag.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ForEachTag.java	18 Jun 2002 18:36:43 -0000	1.13
  +++ ForEachTag.java	26 Jun 2002 09:24:35 -0000	1.14
  @@ -145,7 +145,7 @@
                   if (indexVar != null) {
                       context.setVariable(indexVar, new Integer(index));
                   }
  -                getBody().run(context, output);
  +                invokeBody(output);
                   
                   // now we need to move to next index
                   index++;
  
  
  
  1.6       +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/OtherwiseTag.java
  
  Index: OtherwiseTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/OtherwiseTag.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- OtherwiseTag.java	17 May 2002 15:18:08 -0000	1.5
  +++ OtherwiseTag.java	26 Jun 2002 09:24:35 -0000	1.6
  @@ -83,6 +83,6 @@
       // Tag interface
       //------------------------------------------------------------------------- 
       public void doTag(XMLOutput output) throws Exception {
  -        getBody().run(context, output);
  +        invokeBody(output);
       }
   }
  
  
  
  1.7       +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/IfTag.java
  
  Index: IfTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/IfTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- IfTag.java	17 May 2002 15:18:08 -0000	1.6
  +++ IfTag.java	26 Jun 2002 09:24:35 -0000	1.7
  @@ -89,7 +89,7 @@
       public void doTag(XMLOutput output) throws Exception {
           if (test != null) {
               if (test.evaluateAsBoolean(context)) {
  -                getBody().run(context, output);
  +                invokeBody(output);
               }
           }
           else {
  
  
  
  1.6       +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/WhenTag.java
  
  Index: WhenTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/WhenTag.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WhenTag.java	17 May 2002 15:18:08 -0000	1.5
  +++ WhenTag.java	26 Jun 2002 09:24:35 -0000	1.6
  @@ -93,7 +93,7 @@
           if ( test != null ) {            
               if ( test.evaluateAsBoolean( context ) ) {
                   value = true;
  -                getBody().run(context, output);
  +                invokeBody(output);
               }
           }
       }
  
  
  
  1.2       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ElementTag.java
  
  Index: ElementTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ElementTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ElementTag.java	18 Jun 2002 08:31:02 -0000	1.1
  +++ ElementTag.java	26 Jun 2002 09:24:35 -0000	1.2
  @@ -116,7 +116,7 @@
               localName = name;
           }
           output.startElement(namespace, localName, name, attributes);
  -        getBody().run(context,  output);
  +        invokeBody(  output);
           output.endElement(namespace, localName, name);
       }
       
  
  
  
  1.9       +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ParseTag.java
  
  Index: ParseTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ParseTag.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ParseTag.java	17 May 2002 15:18:13 -0000	1.8
  +++ ParseTag.java	26 Jun 2002 09:24:35 -0000	1.9
  @@ -124,7 +124,7 @@
               SAXContentHandler handler = new SAXContentHandler();
               XMLOutput newOutput = new XMLOutput(handler);
               handler.startDocument();
  -            getBody().run(context, newOutput);
  +            invokeBody( newOutput);
               handler.endDocument();
               document = handler.getDocument();
               /*
  
  
  
  1.9       +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ForEachTag.java
  
  Index: ForEachTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/ForEachTag.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ForEachTag.java	25 May 2002 18:27:21 -0000	1.8
  +++ ForEachTag.java	26 Jun 2002 09:24:35 -0000	1.9
  @@ -102,7 +102,7 @@
                   if (var != null) {
                       context.setVariable(var, iterationValue);
                   }
  -                getBody().run(context, output);
  +                invokeBody(output);
               }
           }
       }
  
  
  
  1.2       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/IfTag.java
  
  Index: IfTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/IfTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IfTag.java	20 May 2002 10:09:28 -0000	1.1
  +++ IfTag.java	26 Jun 2002 09:24:35 -0000	1.2
  @@ -92,7 +92,7 @@
           
           Object xpathContext = getXPathContext();
           if ( select.booleanValueOf(xpathContext) ) {
  -            getBody().run( context, output );
  +            invokeBody(output);
           }
       }
   
  
  
  
  1.8       +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/StaticTag.java
  
  Index: StaticTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/StaticTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StaticTag.java	25 Jun 2002 19:12:29 -0000	1.7
  +++ StaticTag.java	26 Jun 2002 09:24:36 -0000	1.8
  @@ -107,7 +107,7 @@
       //-------------------------------------------------------------------------       
            
       public void doTag(XMLOutput output) throws Exception {
           output.startElement(uri, localName, qname, attributes);
  -        getBody().run(context,  output);
  +        invokeBody(  output);
           output.endElement(uri, localName, qname);
       }
       
  
  
  
  1.5       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jsl/StylesheetTag.java
  
  Index: StylesheetTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jsl/StylesheetTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StylesheetTag.java	22 Jun 2002 15:53:27 -0000	1.4
  +++ StylesheetTag.java	26 Jun 2002 09:24:36 -0000	1.5
  @@ -123,7 +123,7 @@
   		stylesheet.clear();
   
   		// run the body to add the rules
  -		getBody().run(context, output);
  +		invokeBody(output);
   		stylesheet.setModeName(getMode());
   
   		if (var != null) {
  
  
  
  1.4       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jsl/TemplateTag.java
  
  Index: TemplateTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jsl/TemplateTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TemplateTag.java	22 Jun 2002 15:53:28 -0000	1.3
  +++ TemplateTag.java	26 Jun 2002 09:24:36 -0000	1.4
  @@ -231,7 +231,7 @@
                   if (log.isDebugEnabled()) {
                       log.debug( "Firing template body for match: " + match + " and node:
" + node );          
                   }
  -                getBody().run(context, output);
  +                invokeBody(output);
               }
           };                    
       }
  
  
  
  1.8       +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/InvokeBodyTag.java
  
  Index: InvokeBodyTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/InvokeBodyTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- InvokeBodyTag.java	17 May 2002 15:18:12 -0000	1.7
  +++ InvokeBodyTag.java	26 Jun 2002 09:24:36 -0000	1.8
  @@ -103,7 +103,7 @@
                   throw new JellyException("Cannot invoke body, no dynamic tag is defined
in this block");
               }
               else {
  -                tag.getBody().run(context, output);
  +                tag.invokeBody(output);
               }
           }
       }
  
  
  
  1.6       +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DefineTagLibTag.java
  
  Index: DefineTagLibTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DefineTagLibTag.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefineTagLibTag.java	17 May 2002 15:18:12 -0000	1.5
  +++ DefineTagLibTag.java	26 Jun 2002 09:24:36 -0000	1.6
  @@ -98,7 +98,7 @@
   
           context.registerTagLibrary( getUri(), tagLibrary );
           
  -        getBody().run(context, output);
  +        invokeBody(output);
   
           tagLibrary = null;
       }    
  
  
  
  1.2       +2 -2      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/validate/ValidateTag.java
  
  Index: ValidateTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/validate/ValidateTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ValidateTag.java	23 Jun 2002 01:29:34 -0000	1.1
  +++ ValidateTag.java	26 Jun 2002 09:24:36 -0000	1.2
  @@ -115,7 +115,7 @@
               
               ContentHandler handler = filter.getContentHandler();
               handler.startDocument();
  -            getBody().run(context, new XMLOutput( handler ) );
  +            invokeBody( new XMLOutput( handler ) );
               handler.endDocument();
               valid = filter.isValid();            
           }
  @@ -139,7 +139,7 @@
   	
   	        VerifierHandler handler = verifier.getVerifierHandler();     
               handler.startDocument();
  -	        getBody().run(context, new XMLOutput( handler ) );
  +	        invokeBody( new XMLOutput( handler ) );
               handler.endDocument();
               valid = handler.isValid();            
           }
  
  
  
  1.3       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/http/MethodSupportTag.java
  
  Index: MethodSupportTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/http/MethodSupportTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MethodSupportTag.java	25 Jun 2002 19:12:29 -0000	1.2
  +++ MethodSupportTag.java	26 Jun 2002 09:24:36 -0000	1.3
  @@ -110,7 +110,7 @@
           
           try {
               // must use inner tags to extract the output....
  -            getBody().run(context, output)
  +            invokeBody(output)
           }
           finally {
               client.endSession();
  
  
  
  1.5       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/sql/TransactionTag.java
  
  Index: TransactionTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/sql/TransactionTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TransactionTag.java	22 Jun 2002 15:53:28 -0000	1.4
  +++ TransactionTag.java	26 Jun 2002 09:24:36 -0000	1.5
  @@ -148,7 +148,7 @@
   
           boolean finished = false;
           try {
  -            getBody().run(context, output);
  +            invokeBody(output);
               finished = true;
           }
           catch (Exception e) {
  
  
  
  1.15      +10 -14    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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TagSupport.java	25 Jun 2002 17:12:57 -0000	1.14
  +++ TagSupport.java	26 Jun 2002 09:24:36 -0000	1.15
  @@ -161,12 +161,6 @@
       
       /** @return the body of the tag */
       public Script getBody() {
  -        if ( isTrim()
  -             &&
  -             ! hasTrimmed )
  -        {
  -            trimBody();
  -        }
           return body;
       }
       
  @@ -203,9 +197,8 @@
        * @return the text evaluation of the body
        */
       protected String getBodyText() throws Exception {
  -        // XXX: could maybe optimise this later on by having a pool of buffers
           StringWriter writer = new StringWriter();
  -        getBody().run(context, XMLOutput.createXMLOutput(writer));
  +        invokeBody(XMLOutput.createXMLOutput(writer));
           return writer.toString();
       }
       
  @@ -213,7 +206,10 @@
        * Invokes the body of this tag using the given output
        */
       protected void invokeBody(XMLOutput output) throws Exception {
  -        getBody().run(context, output);
  +        if ( isTrim() && ! hasTrimmed ) {
  +            trimBody();
  +        }
  +        invokeBody(output);
       }
   
       /** 
  
  
  
  1.4       +2 -2      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ojb/BrokerTag.java
  
  Index: BrokerTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ojb/BrokerTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BrokerTag.java	20 Jun 2002 14:30:43 -0000	1.3
  +++ BrokerTag.java	26 Jun 2002 09:24:36 -0000	1.4
  @@ -90,14 +90,14 @@
           }
           if ( broker != null ) {
               context.setVariable(var, broker);            
  -            getBody().run(context, output);                
  +            invokeBody(output);                
           }
           else {
               broker = PersistenceBrokerFactory.createPersistenceBroker();            
               context.setVariable(var, broker);            
               
               try {
  -                getBody().run(context, output);                
  +                invokeBody(output);                
               }
               finally {            
                   broker.clearCache();
  
  
  

--
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