Source:
private void addStorageDomainsColumn() { CustomSelectionCell customSelectionCellStorageDomain = new CustomSelectionCell(new ArrayList<String>()); customSelectionCellStorageDomain.setStyle(""); Column<DiskImage, String> storageDomainsColumn = new Column<DiskImage, String>(customSelectionCellStorageDomain) { @Override public String getValue(DiskImage disk) { ImportDiskData importData = importModel.getDiskImportData(disk.getId()); ArrayList<String> storageDomainsNameList = new ArrayList<>(); StorageDomain selectedStorageDomain = null; if (importData != null && importData.getStorageDomains() != null) { for (StorageDomain storageDomain : importData.getStorageDomains()) { storageDomainsNameList.add( new StorageDomainFreeSpaceRenderer<>().render(storageDomain)); if (importData.getSelectedStorageDomain() != null) { if (storageDomain.getId().equals(importData.getSelectedStorageDomain().getId())) { selectedStorageDomain = storageDomain; } } } } ((CustomSelectionCell) getCell()).setOptions(storageDomainsNameList); if (!storageDomainsNameList.isEmpty()) { if (selectedStorageDomain != null) { return new StorageDomainFreeSpaceRenderer<>().render(selectedStorageDomain); } else { return storageDomainsNameList.get(0); } } return ""; } }; storageDomainsColumn.setFieldUpdater(new FieldUpdater<DiskImage, String>() { @Override public void update(int index, DiskImage disk, String value) { String storageDomainName = value.substring(0, value.lastIndexOf(" (")); importModel.getDiskImportData(disk.getId()).setSelectedStorageDomainString(storageDomainName); diskTable.asEditor().edit(importModel.getImportDiskListModel()); } }); diskTable.addColumn(storageDomainsColumn, constants.storageDomainDisk(), "180px"); }

Target:
private void addStorageDomainsColumn() { CustomSelectionCell customSelectionCellStorageDomain = new CustomSelectionCell(new ArrayList<String>()); customSelectionCellStorageDomain.setStyle(EMPTY_STYLE); Column<DiskImage, String> storageDomainsColumn = new Column<DiskImage, String>(customSelectionCellStorageDomain) { @Override public String getValue(DiskImage disk) { ImportDiskData importData = importModel.getDiskImportData(disk.getId()); ArrayList<String> storageDomainsNameList = new ArrayList<>(); StorageDomain selectedStorageDomain = null; if (importData != null && importData.getStorageDomains() != null) { for (StorageDomain storageDomain : importData.getStorageDomains()) { storageDomainsNameList.add( new StorageDomainFreeSpaceRenderer<>().render(storageDomain)); if (importData.getSelectedStorageDomain() != null) { if (storageDomain.getId().equals(importData.getSelectedStorageDomain().getId())) { selectedStorageDomain = storageDomain; } } } } ((CustomSelectionCell) getCell()).setOptions(storageDomainsNameList); if (!storageDomainsNameList.isEmpty()) { if (selectedStorageDomain != null) { return new StorageDomainFreeSpaceRenderer<>().render(selectedStorageDomain); } else { return storageDomainsNameList.get(0); } } return ""; } }; storageDomainsColumn.setFieldUpdater(new FieldUpdater<DiskImage, String>() { @Override public void update(int index, DiskImage disk, String value) { String storageDomainName = value.substring(0, value.lastIndexOf(" (")); importModel.getDiskImportData(disk.getId()).setSelectedStorageDomainString(storageDomainName); diskTable.asEditor().edit(importModel.getImportDiskListModel()); } }); diskTable.addColumn(storageDomainsColumn, constants.storageDomainDisk(), "180px"); }