Martin Mucha has uploaded a new change for review.

Change subject: webadmin: reverted removal of selectedItemsChanged method.
......................................................................

webadmin: reverted removal of selectedItemsChanged method.

This method was mistakingly removed as a part of one big refactor.
Apparently it was removed because it seems that this method does the
same thing as overriden one, but that's not true, both calls their
private equally named method. This could be fixed by making that
method protected, but after some research this is not easily doable,
so I just returned removed method back and place warning comment to
method being overridden.

Change-Id: I473566cf0755519eb7fc922c435ae8a2ee545779
Bug-Url: https://bugzilla.redhat.com/1180897
Signed-off-by: Martin Mucha <mmu...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/SearchableListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/macpool/SharedMacPoolListModel.java
2 files changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/99/36899/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/SearchableListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/SearchableListModel.java
index 39202ae..1aedc08 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/SearchableListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/SearchableListModel.java
@@ -612,6 +612,11 @@
 
     @Override
     protected void selectedItemsChanged() {
+        /*
+        NOTICE, that there's lot of methods overriding this one, looking 'just 
like' this one, which seems wrong.
+        But notice that all those 'updateActionAvailability()' are private, 
and does not extends each other.
+        Making #updateActionAvailability() protected seems not very 
straightforward, therefore it's not fixed.
+        * */
         super.selectedItemsChanged();
         updateActionAvailability();
     }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/macpool/SharedMacPoolListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/macpool/SharedMacPoolListModel.java
index 08f7220..2e9a5c1 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/macpool/SharedMacPoolListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/macpool/SharedMacPoolListModel.java
@@ -87,6 +87,12 @@
         getRemoveCommand().setIsExecutionAllowed(removeAllowed);
     }
 
+    @Override
+    protected void selectedItemsChanged() {
+        super.selectedItemsChanged();
+        updateActionAvailability();
+    }
+
     private void newMacPool() {
         SharedMacPoolModel model = new NewSharedMacPoolModel(this, false);
         model.setEntity(new MacPool());


-- 
To view, visit http://gerrit.ovirt.org/36899
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I473566cf0755519eb7fc922c435ae8a2ee545779
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmu...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to