myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svieu...@apache.org
Subject cvs commit: incubator-myfaces/src/jsfapi/javax/faces/component UIData.java
Date Fri, 26 Nov 2004 22:04:57 GMT
svieujot    2004/11/26 14:04:57

  Modified:    src/jsfapi/javax/faces/component UIData.java
  Log:
  Make UIData work with Collection and not only List.
  This allows component like x:dataList to work with Sets, or any type of collection data
model.
  
  Revision  Changes    Path
  1.27      +10 -2     incubator-myfaces/src/jsfapi/javax/faces/component/UIData.java
  
  Index: UIData.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/jsfapi/javax/faces/component/UIData.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- UIData.java	13 Sep 2004 15:59:44 -0000	1.26
  +++ UIData.java	26 Nov 2004 22:04:57 -0000	1.27
  @@ -27,6 +27,7 @@
   import java.io.Serializable;
   import java.sql.ResultSet;
   import java.util.ArrayList;
  +import java.util.Collection;
   import java.util.HashMap;
   import java.util.Iterator;
   import java.util.List;
  @@ -35,6 +36,10 @@
    * @author Manfred Geiler (latest modification by $Author$)
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.27  2004/11/26 22:04:57  svieujot
  + * Make UIData work with Collection and not only List.
  + * This allows component like x:dataList to work with Sets, or any type of collection data
model.
  + *
    * Revision 1.26  2004/09/13 15:59:44  manolito
    * fixed problems with nested UIData and HtmlDataTable components
    *
  @@ -670,6 +675,10 @@
           else if (value instanceof List)
           {
               return new ListDataModel((List)value);
  +        }
  +        else if (value instanceof Collection)
  +        {
  +            return new ListDataModel( new ArrayList((Collection)value) );
           }
           else if (OBJECT_ARRAY_CLASS.isAssignableFrom(value.getClass()))
           {
  
  
  

Mime
View raw message