click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r916660 - /click/trunk/click/framework/src/org/apache/click/control/Table.java
Date Fri, 26 Feb 2010 12:21:06 GMT
Author: sabob
Date: Fri Feb 26 12:21:06 2010
New Revision: 916660

URL: http://svn.apache.org/viewvc?rev=916660&view=rev
Log:
reverted incomplete DataProvider checkin

Modified:
    click/trunk/click/framework/src/org/apache/click/control/Table.java

Modified: click/trunk/click/framework/src/org/apache/click/control/Table.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/Table.java?rev=916660&r1=916659&r2=916660&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/control/Table.java (original)
+++ click/trunk/click/framework/src/org/apache/click/control/Table.java Fri Feb 26 12:21:06
2010
@@ -30,6 +30,7 @@
 import org.apache.click.Control;
 import org.apache.click.util.ClickUtils;
 import org.apache.click.util.HtmlStringBuffer;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.math.NumberUtils;
 
@@ -382,9 +383,6 @@
     /** The table HTML <td> height attribute. */
     protected String height;
 
-    /** The table data provider. */
-    protected CachingDataProvider dataProvider;
-
     /**
      * The table rows set 'hover' CSS class on mouseover events flag. By default
      * hoverRows is false.
@@ -428,11 +426,11 @@
      */
     protected boolean renderId;
 
-//    /**
-//     * The list Table rows. Please note the rowList is cleared in table
-//     * {@link #onDestroy()} method at the end of each request.
-//     */
-//    protected List rowList;
+    /**
+     * The list Table rows. Please note the rowList is cleared in table
+     * {@link #onDestroy()} method at the end of each request.
+     */
+    protected List rowList;
 
     /**
      * The show table banner flag detailing number of rows and rows
@@ -746,35 +744,6 @@
     }
 
     /**
-     * Return the table row list DataProvider.
-     *
-     * @return the table row list DataProvider
-     */
-    public DataProvider getDataProvider() {
-        return dataProvider;
-    }
-
-    /**
-     * Set the table row list DataProvider.
-     *
-     * @param dataProvider the table row list DataProvider
-     */
-    public void setDataProvider(DataProvider dataProvider) {
-        if (dataProvider != null) {
-
-            if (dataProvider instanceof CachingDataProvider) {
-                this.dataProvider = (CachingDataProvider) dataProvider;
-
-            } else {
-                this.dataProvider = new CachingDataProvider(dataProvider);
-            }
-
-        } else {
-            this.dataProvider = null;
-        }
-    }
-
-    /**
      * Return the table HTML <td> height attribute.
      *
      * @return the table HTML <td> height attribute
@@ -1024,12 +993,11 @@
      * @return the list of table rows
      */
     public List getRowList() {
-        if (dataProvider != null) {
-            return dataProvider.getData();
-
-        } else {
-            return Collections.EMPTY_LIST;
+        if (rowList == null) {
+            rowList = new ArrayList(0);
         }
+
+        return rowList;
     }
 
     /**
@@ -1042,7 +1010,7 @@
      * @param rowList the list of table rows to set
      */
     public void setRowList(List rowList) {
-        this.dataProvider = new CachingDataProvider(rowList);
+        this.rowList = rowList;
     }
 
     /**
@@ -1294,7 +1262,7 @@
             }
         }
         if (getNullifyRowListOnDestroy()) {
-            getRowList().clear();
+            setRowList(null);
         }
     }
 



Mime
View raw message