diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java b/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java index 2cbe734c..f9c9a20e 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java @@ -697,4 +697,11 @@ public final class Utils { + Constants.DOUBLE_QUOTE; } + public static String getOrEmptyDisplayValue(final String value) { + if (StringUtils.isBlank(value)) { + return Constants.EMPTY_NOTE; + } + return value; + } + } diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/form/SelectionFieldBuilder.java b/src/main/java/ch/ethz/seb/sebserver/gui/form/SelectionFieldBuilder.java index 0fc30983..5a417d9e 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/form/SelectionFieldBuilder.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/form/SelectionFieldBuilder.java @@ -110,7 +110,7 @@ public final class SelectionFieldBuilder extends FieldBuilder { final GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, true); label.setLayoutData(gridData); - label.setText((this.value != null) ? this.value : Constants.EMPTY_NOTE); + label.setText(Constants.EMPTY_NOTE); if (this.label != null) { WidgetFactory.setTestId(label, this.label.name); }