Author: knopp
Date: Mon Dec 17 08:31:27 2007
New Revision: 604918
URL: http://svn.apache.org/viewvc?rev=604918&view=rev
Log:
Don't query for total row count in constructor
Modified:
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java
Modified:
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java?rev=604918&r1=604917&r2=604918&view=diff
==============================================================================
---
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java
(original)
+++
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java
Mon Dec 17 08:31:27 2007
@@ -19,6 +19,7 @@
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.list.Loop;
+import org.apache.wicket.model.Model;
import org.apache.wicket.version.undo.Change;
/**
@@ -194,9 +195,9 @@
* The label provider for the text that the links should be
displaying.
*/
public PagingNavigation(final String id, final IPageable pageable,
- final IPagingLabelProvider labelProvider)
+ final IPagingLabelProvider labelProvider)
{
- super(id, pageable.getPageCount());
+ super(id, null);
this.pageable = pageable;
this.labelProvider = labelProvider;
startIndex = 0;
@@ -271,6 +272,7 @@
protected void onBeforeRender()
{
+ setModel(new Model(Integer.valueOf(pageable.getPageCount())));
// PagingNavigation itself (as well as the PageableListView)
// may have pages.