Ravi Nori has uploaded a new change for review. Change subject: webadmin: addHost form leaves json checkbox locked when switching between clusters ......................................................................
webadmin: addHost form leaves json checkbox locked when switching between clusters Edit host dialog needs a change listener to enable and disable json checkbox Change-Id: I38bfe657750819a772a97251f3cee93cc2de9d76 Bug-Url: https://bugzilla.redhat.com/1209754 Signed-off-by: Ravi Nori <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/22/41122/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java index 4a87d6e..d5e4e45 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java @@ -866,6 +866,27 @@ })); } + hostModel.getCluster().getSelectedItemChangedEvent().addListener(new IEventListener<EventArgs>() { + + @Override + public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { + ListModel<VDSGroup> clusterModel = hostModel.getCluster(); + if (clusterModel.getSelectedItem() != null) { + VDSGroup cluster = clusterModel.getSelectedItem(); + Boolean jsonSupported = + (Boolean) AsyncDataProvider.getInstance().getConfigValuePreConverted(ConfigurationValues.JsonProtocolSupported, + cluster.getCompatibilityVersion().toString()); + if (jsonSupported) { + hostModel.getProtocol().setEntity(true); + hostModel.getProtocol().setIsChangeable(true); + } else { + hostModel.getProtocol().setEntity(false); + hostModel.getProtocol().setIsChangeable(false); + } + } + } + }); + UICommand onSaveFalseCommand = UICommand.createDefaultOkUiCommand("OnSaveFalse", hostListModel); //$NON-NLS-1$ hostModel.getCommands().add(onSaveFalseCommand); -- To view, visit https://gerrit.ovirt.org/41122 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38bfe657750819a772a97251f3cee93cc2de9d76 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ravi Nori <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
