click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r931072 - /click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java
Date Tue, 06 Apr 2010 10:01:59 GMT
Author: sabob
Date: Tue Apr  6 10:01:59 2010
New Revision: 931072

URL: http://svn.apache.org/viewvc?rev=931072&view=rev
Log:
more explicit dataprovider code

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=931072&r1=931071&r2=931072&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
Tue Apr  6 10:01:59 2010
@@ -28,7 +28,7 @@ import org.apache.click.examples.domain.
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.service.CustomerService;
 import org.apache.click.util.Bindable;
-import org.apache.click.util.PagingDataProvider;
+import org.apache.click.dataprovider.PagingDataProvider;
 import org.springframework.stereotype.Component;
 
 /**
@@ -79,13 +79,12 @@ public class LargeDatasetDemo extends Bo
         table.setDataProvider(new PagingDataProvider<Customer>() {
 
             public List<Customer> getData() {
-                List customers = customerService.getCustomersForPage(
-                                                table.getFirstRow(),
-                                                table.getPageSize(),
-                                                table.getSortedColumn(),
-                                                table.isSortedAscending());
-
-                return customers;
+                int start = table.getFirstRow();
+                int count = table.getPageSize();
+                String sortColumn = table.getSortedColumn();
+                boolean ascending = table.isSortedAscending();
+ 
+                return customerService.getCustomersForPage(start, count, sortColumn, ascending);
             }
 
             public int size() {



Mime
View raw message