This is an automated email from the ASF dual-hosted git repository.
doebele pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git
The following commit(s) were added to refs/heads/master by this push:
new f9f095c EMPIREDB-282 small fix
f9f095c is described below
commit f9f095c5b31cfa9c33680de127298f8304327ab8
Author: Rainer Döbele <[email protected]>
AuthorDate: Tue Oct 8 08:54:15 2019 +0200
EMPIREDB-282
small fix
---
.../org/apache/empire/jsf2/controls/SelectInputControl.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/SelectInputControl.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/SelectInputControl.java
index b60b8d0..2795cce 100644
---
a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/SelectInputControl.java
+++
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/SelectInputControl.java
@@ -232,8 +232,8 @@ public class SelectInputControl extends InputControl
Object value;
Object valueExpressionFlag =
input.getAttributes().get(SelectInputControl.VALUE_EXPRESSION_FLAG);
if (ObjectUtils.getBoolean(valueExpressionFlag))
- { // Use value as is
- value = e.getValue();
+ { // Use formatted value
+ value = formatInputValue(e.getValue());
}
else
{ // Convert to String
@@ -294,6 +294,12 @@ public class SelectInputControl extends InputControl
@Override
protected Object formatInputValue(Object value, InputInfo ii)
{
+ // the value
+ return formatInputValue(value);
+ }
+
+ protected Object formatInputValue(Object value)
+ {
// the enum Value
if (value != null && value.getClass().isEnum())
{