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 2014/01/09 14:04:04 UTC
[18/50] [abbrv] git commit: WICKET-4905 PagingNavigation: possible to
call setStartIndex() earlier than onBeforeRender?
WICKET-4905 PagingNavigation: possible to call setStartIndex() earlier than onBeforeRender?
set the model and the start index in onConfigure(), not in onBeforeRender()
(cherry picked from commit 1724d89e5a16c4588f42cb551f028803dab193c7)
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/dd187fce
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/dd187fce
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/dd187fce
Branch: refs/heads/sandbox/WICKET-4686
Commit: dd187fce1512871b2f2b5ed55a8fa20beb7edf23
Parents: ff9d0b4
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:45:31 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/dd187fce/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
+}