You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2008/03/06 04:17:49 UTC

svn commit: r634139 - /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Grid.java

Author: hlship
Date: Wed Mar  5 19:17:46 2008
New Revision: 634139

URL: http://svn.apache.org/viewvc?rev=634139&view=rev
Log:
TAPESTRY-2237: Grid should make its "currentPage" value available to containing components

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Grid.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Grid.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Grid.java?rev=634139&r1=634138&r2=634139&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Grid.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Grid.java Wed Mar  5 19:17:46 2008
@@ -155,7 +155,6 @@
     private String _rowClass;
 
     @Persist
-    @Property
     private int _currentPage = 1;
 
     @Persist
@@ -316,7 +315,7 @@
         if (availableRows == 0) return;
 
         BeanModelUtils.modify(_model, _add, _remove, _reorder);
-        
+
         int maxPage = ((availableRows - 1) / _rowsPerPage) + 1;
 
         // This captures when the number of rows has decreased, typically due to deletions.
@@ -367,5 +366,13 @@
         return _pagerPosition.isMatchBottom() ? _pager : null;
     }
 
+    public int getCurrentPage()
+    {
+        return _currentPage;
+    }
 
+    public void setCurrentPage(int currentPage)
+    {
+        _currentPage = currentPage;
+    }
 }