Update of /cvsroot/displaytag/display09/src/org/apache/taglibs/display
In directory sc8-pr-cvs1:/tmp/cvs-serv15153/src/org/apache/taglibs/display

Modified Files:
        Decorator.java TableDecorator.java 
Log Message:
fixed old methods

Index: Decorator.java
===================================================================
RCS file: /cvsroot/displaytag/display09/src/org/apache/taglibs/display/Decorator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Decorator.java      22 Jun 2003 16:16:56 -0000      1.2
--- Decorator.java      15 Jul 2003 21:53:56 -0000      1.3
***************
*** 20,35 ****
         * returns the Object where the iteration is performed as a List
         * @return List
!        * @deprecated use getObject()
         */
        public List getList()
        {
!               if (getObject() instanceof List)
!               {
!                       return (List) getObject();
!               }
!               else
!               {
!                       throw new RuntimeException("This function is only supported if 
the given collection is a java.util.List.");
!               }
        }
  
--- 20,28 ----
         * returns the Object where the iteration is performed as a List
         * @return List
!        * @deprecated use getDecoratedObject()
         */
        public List getList()
        {
!               return (List) getDecoratedObject();
        }
  
***************
*** 37,53 ****
         * returns the Object where the iteration is performed as a Collection
         * @return Collection
!        * @deprecated use getObject()
         */
        public Collection getCollection()
        {
!               if (getObject() instanceof Collection)
!               {
!                       return (Collection) getObject();
!               }
!               else
!               {
!                       throw new RuntimeException("Function only supported if the 
given collection is a java.util.Collection.");
!               }
        }
  
  }
--- 30,48 ----
         * returns the Object where the iteration is performed as a Collection
         * @return Collection
!        * @deprecated use getDecoratedObject()
         */
        public Collection getCollection()
        {
!               return (Collection) getDecoratedObject();
        }
  
+       /**
+        * returns the Object for the current row
+        * @return Object
+        * @deprecated use getCurrentRowObject()
+        */
+       public Object getObject()
+       {
+               return getCurrentRowObject();
+       }
  }

Index: TableDecorator.java
===================================================================
RCS file: 
/cvsroot/displaytag/display09/src/org/apache/taglibs/display/TableDecorator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TableDecorator.java 21 Jun 2003 12:34:49 -0000      1.1
--- TableDecorator.java 15 Jul 2003 21:53:56 -0000      1.2
***************
*** 1,4 ****
--- 1,7 ----
  package org.apache.taglibs.display;
  
+ import java.util.Collection;
+ import java.util.List;
+ 
  /**
   * <p>Placeholder class to preserve compatibility with decorator created with older 
version of the display taglib</p>
***************
*** 9,14 ****
   * @deprecated use <code>org.displaytag.decorator.TableDecorator</code>
   */
! public abstract class TableDecorator extends Decorator
  {
  
  }
--- 12,45 ----
   * @deprecated use <code>org.displaytag.decorator.TableDecorator</code>
   */
! public abstract class TableDecorator extends org.displaytag.decorator.TableDecorator
  {
+       /**
+        * returns the Object where the iteration is performed as a List
+        * @return List
+        * @deprecated use getDecoratedObject()
+        */
+       public List getList()
+       {
+               return (List) getDecoratedObject();
+       }
  
+       /**
+        * returns the Object where the iteration is performed as a Collection
+        * @return Collection
+        * @deprecated use getDecoratedObject()
+        */
+       public Collection getCollection()
+       {
+               return (Collection) getDecoratedObject();
+       }
+ 
+       /**
+        * returns the Object for the current row
+        * @return Object
+        * @deprecated use getCurrentRowObject()
+        */
+       public Object getObject()
+       {
+               return getCurrentRowObject();
+       }
  }




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to