Gilad Chaplik has submitted this change and it was merged.
Change subject: webadmin: Consolidate default confirm dialog handling
......................................................................
webadmin: Consolidate default confirm dialog handling
Before this patch, model providers (TabModelProvider.getConfirmModelPopup)
handled confirm dialogs differently than popup presenter widgets
(AbstractModelBoundPopupPresenterWidget.getConfirmModelPopup):
- TabModelProvider used default confirm dialog implementation
(DefaultConfirmationPopupPresenterWidget) as the fallback
- AbstractModelBoundPopupPresenterWidget had no fallback, and
the concrete subclass had to override getConfirmModelPopup
in order to use DefaultConfirmationPopupPresenterWidget
After this patch, default confirm dialog handling is consolidated:
- ModelBoundPopupHandler can now be instructed to use default
confirm dialog implementation via setDefaultConfirmPopupProvider
- TabModelProvider calls setDefaultConfirmPopupProvider to ensure
same behavior as before
- AbstractModelBoundPopupPresenterWidget has new constructor that
allows it to configure default confirm dialog handling via
setDefaultConfirmPopupProvider
- GuidePopupPresenterWidget no longer needs to override
getConfirmModelPopup just to use default confirm dialog impl.
(all it needs to do is to use overloaded constructor for this
purpose)
In addition, following classes were cleaned up a bit:
- VolumePopupPresenterWidget
- HostInstallPopupPresenterWidget
- ImportTemplatePopupPresenterWidget
- ImportVmPopupPresenterWidget
Change-Id: I4eabc54e661cf68ba62347e0fc2be6972122a18e
Signed-off-by: Vojtech Szocs <vszocs(a)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/TabModelProvider.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/gluster/VolumePopupPresenterWidget.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/guide/GuidePopupPresenterWidget.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/host/HostInstallPopupPresenterWidget.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/storage/backup/ImportTemplatePopupPresenterWidget.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/storage/backup/ImportVmPopupPresenterWidget.java
8 files changed, 37 insertions(+), 43 deletions(-)
Approvals:
Gilad Chaplik: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/4632
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4eabc54e661cf68ba62347e0fc2be6972122a18e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(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>