click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From med...@apache.org
Subject svn commit: r921675 - /click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java
Date Thu, 11 Mar 2010 02:51:28 GMT
Author: medgar
Date: Thu Mar 11 02:51:28 2010
New Revision: 921675

URL: http://svn.apache.org/viewvc?rev=921675&view=rev
Log:
improve example comments

Modified:
    click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java?rev=921675&r1=921674&r2=921675&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java
Thu Mar 11 02:51:28 2010
@@ -83,19 +83,17 @@ public class LargeDatasetDemo extends Bo
 
         table.setDataProvider(new DataProvider<Customer>() {
             public List<Customer> getData() {
-                return getPaginatingList();
+                return getCustomerList();
             }
         });
     }
 
     // Private Methods --------------------------------------------------------
 
-    private PaginatingList<Customer> getPaginatingList() {
+    private List<Customer> getCustomerList() {
 
         // Below we retrieve only those customers between:
         //     first row .. (first row + page size)
-        // In a real application one would use an ORM or JDBC to only retrieve
-        // the needed rows
         List<Customer> customerList =
             customerService.getCustomersForPage(table.getFirstRow(),
                                                 table.getPageSize(),
@@ -104,6 +102,10 @@ public class LargeDatasetDemo extends Bo
 
         int customerCount = customerService.getNumberOfCustomers();
 
+        // Return a paginating list of the Table control. The paginating list
+        // provides a wrapper around the "page" of customer data so that the
+        // Table control thinks it is working will the full result set rather
+        // than just a window.
         return new PaginatingList<Customer>(customerList,
                                             table.getFirstRow(),
                                             table.getPageSize(),



Mime
View raw message