Vojtech Szocs has submitted this change and it was merged.
Change subject: webadmin: Prevent SystemTree from losing selection
......................................................................
webadmin: Prevent SystemTree from losing selection
There are basically two listeners for SystemTreeModel's
ItemsChanged event:
(1) SystemTreeModelProvider.updateDataProvider
- actual listener registration code is in
DataBoundTabModelProvider.onCommonModelChange
- this method selects root "System" node
(2) SystemTree.addModelListeners
- this method de-selects last selected node
Upon WebAdmin startup, (2) gets executed after (1) which
causes SystemTree to lose selection.
As a result, code calling SystemTreeModel.getSelectedItem
might blow up on NullPointerException.
This patch ensures SystemTree doesn't lose selection upon
SystemTreeModel's ItemsChanged event.
Change-Id: Ie5c099dd6bbce0f721e7ed2430ecb7124b9241ca
Signed-off-by: Vojtech Szocs <vszocs(a)redhat.com>
---
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/tree/SystemTree.java
1 file changed, 0 insertions(+), 3 deletions(-)
Approvals:
Vojtech Szocs: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/17115
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5c099dd6bbce0f721e7ed2430ecb7124b9241ca
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: Alexander Wels <awels(a)redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Einav Cohen <ecohen(a)redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server