You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2013/12/18 09:45:23 UTC
git commit: WICKET-4905 PagingNavigation: possible to call
setStartIndex() earlier than onBeforeRender?
Updated Branches:
refs/heads/wicket-6.x f36fa2002 -> 1724d89e5
WICKET-4905 PagingNavigation: possible to call setStartIndex() earlier than onBeforeRender?
set the model and the start index in onConfigure(), not in onBeforeRender()
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1724d89e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1724d89e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1724d89e
Branch: refs/heads/wicket-6.x
Commit: 1724d89e5a16c4588f42cb551f028803dab193c7
Parents: f36fa20
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed Dec 18 10:40:41 2013 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Dec 18 10:44:39 2013 +0200
----------------------------------------------------------------------
.../markup/html/navigation/paging/PagingNavigation.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/1724d89e/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java
index a06b886..b498f09 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java
@@ -115,7 +115,6 @@ public class PagingNavigation extends Loop
{
private static final long serialVersionUID = 1L;
-
/** The PageableListView this navigation is navigating. */
protected IPageable pageable;
@@ -238,10 +237,10 @@ public class PagingNavigation extends Loop
this.separator = separator;
}
-
@Override
- protected void onBeforeRender()
+ protected void onConfigure()
{
+ super.onConfigure();
setDefaultModel(new Model<Integer>(
(int)Math.max(Integer.MAX_VALUE, pageable.getPageCount())));
// PagingNavigation itself (as well as the PageableListView)
@@ -250,7 +249,6 @@ public class PagingNavigation extends Loop
// The index of the first page link depends on the PageableListView's
// page currently printed.
setStartIndex();
- super.onBeforeRender();
}
/**
@@ -429,4 +427,4 @@ public class PagingNavigation extends Loop
tag.put("title", PagingNavigation.this.getString(RES, Model.ofMap(vars)));
}
}
-}
\ No newline at end of file
+}