Source:
<code>private Container createDisksItemContainerPanel(List<DiskImage> diskImages) { Row content = new Row(); Column column = new Column(ColumnSize.MD_12); content.add(column); for (DiskImage image: diskImages) { DListElement dl = Document.get().createDLElement(); dl.addClassName(DL_HORIZONTAL); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.statusDisk()), getImageStatus(image.getImageStatus()), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.aliasDisk()), image.getDiskAlias(), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.provisionedSizeDisk()), <START> String.valueOf(image.getSizeInGigabytes()) + constants.gb(), dl); <END> addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.sizeDisk()), String.valueOf(image.getActualSize()) + constants.gb(), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.allocationDisk()), String.valueOf(VolumeType.forValue(image.getVolumeType().getValue())), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.interfaceDisk()), getInterface(image), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.creationDateDisk()), dateRenderer.render(image.getCreationDate()), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.diskSnapshotIDDisk()), String.valueOf(image.getImageId()), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.typeDisk()), String.valueOf(image.getDiskStorageType()), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.descriptionDisk()), StringHelper.isNotNullOrEmpty(image.getDiskDescription()) ? image.getDiskDescription() : constants.notAvailableLabel(), dl); column.getElement().appendChild(dl); } if (diskImages.isEmpty()) { column.getElement().setInnerHTML(constants.noItemsToDisplay()); } return createItemContainerPanel(content); }</code><technical_language>This right approach. rendering logic exists in DiskSizeRenderer - reuse please</technical_language>

Target:
private Container createDisksItemContainerPanel(List<DiskImage> diskImages) { Row content = new Row(); Column column = new Column(ColumnSize.MD_12); content.add(column); for (DiskImage image: diskImages) { DListElement dl = Document.get().createDLElement(); dl.addClassName(DL_HORIZONTAL); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.statusDisk()), getImageStatus(image.getImageStatus()), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.aliasDisk()), image.getDiskAlias(), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.provisionedSizeDisk()), String.valueOf(new DiskSizeRenderer<Long>(SizeConverter.SizeUnit.BYTES).render( image.getSize())), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.sizeDisk()), String.valueOf(new DiskSizeRenderer<Long>(SizeConverter.SizeUnit.BYTES).render( image.getActualSizeInBytes())), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.allocationDisk()), String.valueOf(VolumeType.forValue(image.getVolumeType().getValue())), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.interfaceDisk()), getInterface(image), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.creationDateDisk()), dateRenderer.render(image.getCreationDate()), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.diskSnapshotIDDisk()), String.valueOf(image.getImageId()), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.typeDisk()), String.valueOf(image.getDiskStorageType()), dl); addDetailItem(SafeHtmlUtils.fromSafeConstant(constants.descriptionDisk()), StringHelper.isNotNullOrEmpty(image.getDiskDescription()) ? image.getDiskDescription() : constants.notAvailableLabel(), dl); column.getElement().appendChild(dl); } if (diskImages.isEmpty()) { column.getElement().setInnerHTML(constants.noItemsToDisplay()); } return createItemContainerPanel(content); }