Lior Vernia has uploaded a new change for review. Change subject: webadmin: Set validity in KeyValueModel ......................................................................
webadmin: Set validity in KeyValueModel For consistence with other models, set the validity of the model according to the result of the validation. Change-Id: Iac2e650185d7fe963239a4ca8693463064b1d6cf Signed-off-by: Lior Vernia <lver...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/key_value/KeyValueModel.java 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/27/27027/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/key_value/KeyValueModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/key_value/KeyValueModel.java index 104d58d..134b1f8 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/key_value/KeyValueModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/key_value/KeyValueModel.java @@ -130,10 +130,11 @@ } public boolean validate() { - boolean isValid = true; + setIsValid(true); if (getItems() == null || !getIsAvailable()) { - return isValid; + return true; } + boolean isValid = true; for (KeyValueLineModel keyValueLineModel : (List<KeyValueLineModel>) getItems()) { String key = keyValueLineModel.getKeys().getSelectedItem(); if (!isKeyValid(key)) { @@ -150,6 +151,7 @@ new IValidation[] { regexValidation }); isValid &= keyValueLineModel.getValue().getIsValid(); } + setIsValid(isValid); return isValid; } -- To view, visit http://gerrit.ovirt.org/27027 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac2e650185d7fe963239a4ca8693463064b1d6cf Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Lior Vernia <lver...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches