jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags CopyOfTag.java ForEachTag.java
Date Wed, 23 May 2001 18:00:21 GMT
jstrachan    01/05/23 11:00:21

  Modified:    xtags/lib dom4j.jar
               xtags/src/org/apache/taglibs/xtags/tags CopyOfTag.java
                        ForEachTag.java
  Log:
  Latest patch of dom4j
  
  Revision  Changes    Path
  1.3       +714 -512  jakarta-taglibs/xtags/lib/dom4j.jar
  
  	<<Binary file>>
  
  
  1.4       +0 -10     jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/CopyOfTag.java
  
  Index: CopyOfTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/CopyOfTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CopyOfTag.java	2001/05/09 16:07:10	1.3
  +++ CopyOfTag.java	2001/05/23 18:00:12	1.4
  @@ -58,8 +58,6 @@
   
   package org.apache.taglibs.xtags.tags;
   
  -
  -
   import java.io.IOException;
   import java.util.Iterator;
   import java.util.List;
  @@ -77,17 +75,12 @@
   import org.dom4j.io.OutputFormat;
   import org.dom4j.io.XMLWriter;
   
  -import org.apache.log4j.Category;
  -
   /** A tag which performs a copy-of operation like the XSLT tag
     *
     * @author James Strachan
     */
   public class CopyOfTag extends AbstractXPathTag {
   
  -    /** Logger */
  -    private static final Category log = Category.getInstance( CopyOfTag.class );
  -
       /** Holds value of property xpath. */
       private XPath xpath;
       
  @@ -112,9 +105,6 @@
           if ( input != null ) {
               try {
                   XMLWriter writer = new XMLWriter( pageContext.getOut(), getOutputFormat()
);
  -                
  -                log.info( "Writing input: " + input + " to writer: " + writer );
  -                
                   writer.write( input );
                   writer.flush();
               }
  
  
  
  1.6       +5 -0      jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ForEachTag.java
  
  Index: ForEachTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ForEachTag.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ForEachTag.java	2001/05/21 16:17:55	1.5
  +++ ForEachTag.java	2001/05/23 18:00:15	1.6
  @@ -112,7 +112,10 @@
       /** The input nodes */
       private Object context;
       
  +    /** Cache of original context which is restored after the loop finishes */
  +    private Object originalContext;
       
  +    
       public ForEachTag() {
       }
   
  @@ -131,6 +134,7 @@
       // BodyTag interface
       //------------------------------------------------------------------------- 
       public int doStartTag() throws JspException  {
  +        originalContext = TagHelper.getInputNodes( pageContext );
           iterator = null;
           if ( xpath != null ) {    
               List list = selectNodes();
  @@ -152,6 +156,7 @@
                   finishLoop();
               }
           }
  +        TagHelper.setInputNodes( pageContext, originalContext );
           reset();
           return SKIP_BODY;
       }
  
  
  

Mime
View raw message