Change in ovirt-engine[master]: webadmin: Element IDs in System Tree and Tags

vszocs at redhat.com vszocs at redhat.com
Wed May 15 11:50:36 UTC 2013


Vojtech Szocs has submitted this change and it was merged.

Change subject: webadmin: Element IDs in System Tree and Tags
......................................................................


webadmin: Element IDs in System Tree and Tags

1. Added TreeNodeInfo interface which acts as adapter for providing
   tree node information, all models and model-like classes used
   in CellTree widgets implement this interface.

2. Updated ElementIdUtils.createTreeCellElementId() to support IDs
   in case of single root node, methods which calculate node index
   now use equals() instead of comparing references.

3. Fixed SystemTreeItemModel hierarchy mismatch in SystemTreeModel
   (different child nodes now correctly refer to their parents).

4. Added {get|set}Parent() methods in TagModel due to TreeNodeInfo
   interface, updated TagListModel to reflect parent relationship.

5. Fixed CellTree.Resources being GWT.create()'d for each instance.

6. Fixed CellTree cells being created each time when TreeViewModel
   getNodeInfo() is called, the core principle of cell widgets is
   to use single (flyweight, reusable, stateless) cell to do the
   rendering.

7. Methods to deal with CellTree moved away from TagModelProvider
   directly into TagList (widget managing the CellTree) class.

Example System Tree (node) element ID:
   SystemTree_display_root0_node1_node0 --> label
   (root0 = System, node1 = 2nd DataCenter, node0 = 1st Storage)

Example Tag (node) element ID:
   TagList_display_label_root0_node0 --> label
   TagList_display_pinButton_root0_node0 --> pin tag button
   (root0 = Root, node0 = 1st Tag)

Change-Id: Ie4341a4c4e1740c075987e2a57c0844fa72b971e
Signed-off-by: Vojtech Szocs <vszocs at redhat.com>
---
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/idhandler/HasElementId.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/idhandler/ProvidesElementId.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/model/TreeNodeModel.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/utils/ElementIdUtils.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/AbstractActionPanel.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/AbstractActionStackPanelItem.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/ElementIdCellTable.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tree/ElementIdCellTree.java
A frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/TreeNodeInfo.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/SystemTreeItemModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/SystemTreeModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/tags/TagListModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/tags/TagModel.java
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/tab/basic/MainTabBasicListPresenterWidget.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationTemplates.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AssignTagsPopupView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/configure/RolePopupView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/user/ManageEventsPopupView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/uicommon/model/ModelListTreeViewModel.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/uicommon/model/SimpleSelectionTreeNodeModel.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/uicommon/model/SystemTreeModelProvider.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/uicommon/model/TagModelProvider.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/bookmark/BookmarkList.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/tags/TagItemCell.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/tags/TagList.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/tree/SystemTree.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/tree/SystemTreeItemCell.java
27 files changed, 390 insertions(+), 282 deletions(-)

Approvals:
  Vojtech Szocs: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4341a4c4e1740c075987e2a57c0844fa72b971e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: Alexander Wels <awels at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Einav Cohen <ecohen at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>



More information about the Engine-commits mailing list