Ayal Baron has posted comments on this change.

Change subject: frontend: display correct format in edit domain
......................................................................


Patch Set 1: -Code-Review

(1 comment)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageModel.java
Line 674:             }
Line 675:         }
Line 676: 
Line 677:         getFormat().setItems(formats);
Line 678:         getFormat().setSelectedItem(getStorage() != null ? 
getStorage().getStorageFormat() : selectItem);
So setSelectedItem 'adds' the item even if it doesn't exist in the list.
That means this is working by chance.

In case of a refactor, iiuc you can replace lines 620-640 with:
else
{
    formats.add(StorageFormatType.V1);
}
after line 651 of course.
In addition, setSelectedItem can be removed from everywhere except line 678 
where 'selectItem' can be replaced with last item in getFormat()
Line 679:     }
Line 680: 
Line 681:     private void updateItemsAvailability()
Line 682:     {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0432d633fabcf62b14b267b8dd9ca517b69c029a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to