Noam Slomianko has uploaded a new change for review.

Change subject: webadmin: Irregular behavior of checkbox in QuotaPopupView -> 
QuotaStorageTable  (#846267)
......................................................................

webadmin: Irregular behavior of checkbox in QuotaPopupView -> QuotaStorageTable 
 (#846267)

https://bugzilla.redhat.com/846267

Problem:
        In QuotaPopupView -> QuotaStorageTable the checkbox was not behaving as 
intended
        It would require two "clicks" to select or deselect it, resaulting  in 
bad states

Soulution:
        Changed the constructor call to CheckboxCell from (false, true) to 
(true, true)

        this flag is called "dependsOnSelection".
        internally the gwt code use it to indicate that the state of the 
checkbox should not be saved

        from the gwt code:
        /*
         * Save the new value. However, if the cell depends on the selection, 
then
         * do not save the value because we can get into an inconsistent state.
         */
        if (value != isChecked && !dependsOnSelection()) {
                setViewData(context.getKey(), isChecked);
        } else {
                clearViewData(context.getKey());
        }

Change-Id: I5094d701be9f2e634eec787f780ad913160dd96e
Signed-off-by: Noam Slomianko <nslom...@redhat.com>
---
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/quota/QuotaPopupView.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/68/7168/1

diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/quota/QuotaPopupView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/quota/QuotaPopupView.java
index f2bf39a..6096fce 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/quota/QuotaPopupView.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/quota/QuotaPopupView.java
@@ -205,7 +205,7 @@
         storageQuotaTableContainer.add(quotaStorageTable);
 
         isStorageInQuotaColumn = new Column<QuotaStorage, Boolean>(
-                new CheckboxCell(false, true)) {
+                new CheckboxCell(true, true)) {
             @Override
             public Boolean getValue(QuotaStorage object) {
                 if (selectedStorageGuid.contains(object.getStorageId()) || 
object.getStorageSizeGB() != null) {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5094d701be9f2e634eec787f780ad913160dd96e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Noam Slomianko <nslom...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to