Change in ovirt-engine[master]: webadmin: Improve multi-dialog-per-model infra
Code Review
gerrit at ovirt.org
Fri Aug 11 14:48:25 UTC 2017
>From Vojtech Szocs <vszocs at redhat.com>:
Vojtech Szocs has submitted this change and it was merged. ( https://gerrit.ovirt.org/67532 )
Change subject: webadmin: Improve multi-dialog-per-model infra
......................................................................
webadmin: Improve multi-dialog-per-model infra
1. This infra is now Model-centric, allowing each and every
Model to specify custom properties that behave just like
the standard `Window` and `ConfirmWindow` properties.
For example:
@Override
public Map<String, Model> getWindowProperties() {
Map<String, Model> map = super.getWindowProperties();
map.put(PROP_CUSTOM_WINDOW, getCustomWindow());
return map;
}
@Override
public void setWindowProperty(String propName, Model value) {
if (PROP_CUSTOM_WINDOW.equals(propName)) {
setCustomWindow(value);
} else {
super.setWindowProperty(propName, value);
}
}
tells UI infra to treat `PROP_CUSTOM_WINDOW` as another
(additional) Window-like property for the given model.
Note that you still need to map your custom property to
corresponding GWTP popup via ModelBoundPopupResolver API.
2. As a result, removed duplicate code in popup resolver
impl's (which was not aware of multi-dialog-per-model
concept in the first place, anyway) as well as removing
duplicate overrides in VM & Template GIN Modules.
Change-Id: Iba0a72bc7e8e9f980017d24bc92e1b4a7dd5b3c5
Signed-off-by: Vojtech Szocs <vszocs at redhat.com>
---
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractModelBoundPopupPresenterWidget.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/model/ModelBoundPopupHandler.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/model/ModelBoundPopupResolver.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/model/TabModelProvider.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/IModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/Model.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/VmBaseListModel.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/gin/uicommon/TemplateModule.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/gin/uicommon/VirtualMachineModule.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/guide/GuidePopupView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/quota/QuotaPopupView.java
11 files changed, 174 insertions(+), 214 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Greg Sheremeta: Verified; Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/67532
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iba0a72bc7e8e9f980017d24bc92e1b4a7dd5b3c5
Gerrit-PatchSet: 7
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: Greg Sheremeta <gshereme at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list