Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x f5a774318 -> 72ad2383b


make NoRecordsToolbar use onConfigure/setVisible instead of overriding isVisible


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

Branch: refs/heads/wicket-7.x
Commit: 944bad39d95d1d0e02f7ede225e49d4746938f83
Parents: 423a93f
Author: Carl-Eric Menzel <cmen...@apache.org>
Authored: Mon Nov 7 13:00:51 2016 +0100
Committer: Carl-Eric Menzel <cmen...@apache.org>
Committed: Mon Nov 7 13:00:51 2016 +0100

----------------------------------------------------------------------
 .../markup/html/repeater/data/table/NoRecordsToolbar.java    | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/944bad39/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/NoRecordsToolbar.java
----------------------------------------------------------------------
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/NoRecordsToolbar.java
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/NoRecordsToolbar.java
index ff06af0..1f8cd8d 100644
--- 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/NoRecordsToolbar.java
+++ 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/NoRecordsToolbar.java
@@ -80,13 +80,11 @@ public class NoRecordsToolbar extends AbstractToolbar
 
        /**
         * Only shows this toolbar when there are no rows
-        * 
-        * @see org.apache.wicket.Component#isVisible()
         */
        @Override
-       public boolean isVisible()
+       protected void onConfigure()
        {
-               return getTable().getRowCount() == 0;
+               super.onConfigure();
+               setVisible(getTable().getRowCount() == 0);
        }
-
 }

Reply via email to