WICKET-6005 allow updating of whole page

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ba809b31
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ba809b31
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ba809b31

Branch: refs/heads/lambdas
Commit: ba809b31e999d1218e28595d71efd80a48ac1f33
Parents: 156d4a3
Author: Sven Meier <[email protected]>
Authored: Fri Oct 16 15:24:39 2015 +0200
Committer: Sven Meier <[email protected]>
Committed: Fri Oct 16 15:24:39 2015 +0200

----------------------------------------------------------------------
 .../html/navigation/paging/AjaxPagingNavigator.java | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/ba809b31/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigator.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigator.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigator.java
index fb6fcc7..a8b3a55 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigator.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigator.java
@@ -18,7 +18,7 @@ package org.apache.wicket.ajax.markup.html.navigation.paging;
 
 import org.apache.wicket.Component;
 import org.apache.wicket.MarkupContainer;
-import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.Page;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.markup.html.link.AbstractLink;
 import org.apache.wicket.markup.html.navigation.paging.IPageable;
@@ -139,20 +139,16 @@ public class AjaxPagingNavigator extends PagingNavigator
         */
        protected void onAjaxEvent(AjaxRequestTarget target)
        {
-               // update the container (parent) of the pageable, this assumes 
that
-               // the pageable is a component, and that it is a child of a web
-               // markup container.
-
+               // Update a parental container of the pageable, this assumes 
that the pageable is a component.
                Component container = ((Component)pageable);
                while (container instanceof AbstractRepeater || 
container.getOutputMarkupId() == false)
                {
-                       container = container.getParent();
-                       if (container == null)
-                       {
-                               throw new WicketRuntimeException("Unable to 
find a parent component that is no repeater and has setOutputMarkupId(true)");
+                       Component parent = container.getParent();
+                       if (parent == null) {
+                               break;
                        }
+                       container = parent;
                }
-
                target.add(container);
 
                // in case the navigator is not contained by the container, we 
have

Reply via email to