From cdc8ff00159d9dd5ec9ec2995377c10ee57d61b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Zl=C3=A1mal?= Date: Mon, 23 May 2022 13:45:08 +0200 Subject: [PATCH] fix(registrar): return empty value if no option selected in selectbox - Previously generic "--- Not selected ---" option in the select box returned "null" string value. - Now we return empty string which is correctly recognized as an empty/null value for the attribute on Perun side. - This prevents bug when such value should be stored in attribute with checked syntax. --- .../perun/wui/registrar/widgets/items/Selectionbox.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perun-wui-registrar/src/main/java/cz/metacentrum/perun/wui/registrar/widgets/items/Selectionbox.java b/perun-wui-registrar/src/main/java/cz/metacentrum/perun/wui/registrar/widgets/items/Selectionbox.java index 38c7a49f..418c197f 100644 --- a/perun-wui-registrar/src/main/java/cz/metacentrum/perun/wui/registrar/widgets/items/Selectionbox.java +++ b/perun-wui-registrar/src/main/java/cz/metacentrum/perun/wui/registrar/widgets/items/Selectionbox.java @@ -43,7 +43,7 @@ protected Widget initWidget() { getSelect().clear(); if (!isRequired()) { - getSelect().addItem(translation.notSelected(), (String) null); + getSelect().addItem(translation.notSelected(), ""); } Map opts = parseItemOptions();