click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r928356 - /click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java
Date Sun, 28 Mar 2010 08:04:02 GMT
Author: sabob
Date: Sun Mar 28 08:04:01 2010
New Revision: 928356

URL: http://svn.apache.org/viewvc?rev=928356&view=rev
Log:
added paging data provider support to formtable

Modified:
    click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java

Modified: click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java?rev=928356&r1=928355&r2=928356&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java Sun Mar 28
08:04:01 2010
@@ -29,6 +29,7 @@ import org.apache.click.control.Table;
 import org.apache.click.util.HtmlStringBuffer;
 
 import org.apache.click.control.ActionLink;
+import org.apache.click.util.PagingDataProvider;
 import org.apache.commons.lang.StringUtils;
 
 /**
@@ -536,8 +537,15 @@ public class FormTable extends Table {
             //will not correspond to their rows in the rowList.
             sortRowList();
 
-            int firstRow = getFirstRow();
-            int lastRow = getLastRow();
+            int firstRow = 0;
+            int lastRow = 0;
+
+            if (getDataProvider() instanceof PagingDataProvider) {
+                lastRow = getRowList().size();
+            } else {
+                firstRow = getFirstRow();
+                lastRow = getLastRow();
+            }
 
             List rowList = getRowList();
             List columnList = getColumnList();



Mime
View raw message