diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/VocabularyTermStringCellRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/VocabularyTermStringCellRenderer.java index 31da67387ba8b18adc8452c734bfdd606fcd010d..57e755749bdedd312d0a34ef51eaff471ee47782 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/VocabularyTermStringCellRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/VocabularyTermStringCellRenderer.java @@ -44,17 +44,20 @@ public class VocabularyTermStringCellRenderer implements GridCellRenderer<BaseEn { return ""; } - ISerializableComparable cell = values.get(columnIndex); + + ISerializableComparable cell = null; + if (obj instanceof VocabularyTerm) + { + cell = new VocabularyTermTableCell((VocabularyTerm) obj); + values.set(columnIndex, cell); + } + + cell = values.get(columnIndex); if (cell instanceof VocabularyTermTableCell == false) { return cell.toString(); } else { - if (obj instanceof VocabularyTerm) - { - cell = new VocabularyTermTableCell((VocabularyTerm) obj); - values.set(columnIndex, cell); - } VocabularyTermTableCell vocabularyTermTableCell = (VocabularyTermTableCell) cell; VocabularyTerm vocabularyTerm = vocabularyTermTableCell.getVocabularyTerm(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnUtils.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnUtils.java index 7e95119d16a8d1facc7fcb2384956182bcb4b835..457cce849b30d2c92a6e65a5c7ce29302251cf8d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnUtils.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnUtils.java @@ -29,6 +29,7 @@ import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; import com.extjs.gxt.ui.client.widget.grid.CellEditor; import com.google.gwt.event.dom.client.KeyCodes; +import ch.systemsx.cisd.common.shared.basic.utils.StringUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.VocabularyTermModel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.IColumnDefinitionUI; @@ -195,9 +196,9 @@ public class ColumnUtils @Override public Object preProcessValue(Object value) { - if (value == null) + if (StringUtils.isBlank(value)) { - return value; + return null; } return getField().getPropertyEditor().convertStringValue(value.toString()); } @@ -206,9 +207,9 @@ public class ColumnUtils @SuppressWarnings("unchecked") public Object postProcessValue(Object value) { - if (value == null) + if (StringUtils.isBlank(value)) { - return value; + return null; } return getField().getPropertyEditor().getStringValue(value); }