You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by de...@apache.org on 2019/08/29 12:47:14 UTC

[empire-db] branch master updated: EMPIREDB-302

This is an automated email from the ASF dual-hosted git repository.

derjan 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 f843f29  EMPIREDB-302
f843f29 is described below

commit f843f2901c26d27d6fb189f25c3e64d5c81acab0
Author: Jan Glaubitz <ja...@glaubitz.org>
AuthorDate: Thu Aug 29 14:46:06 2019 +0200

    EMPIREDB-302
---
 .../apache/empire/jsf2/controls/CheckboxInputControl.java   | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/CheckboxInputControl.java b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/CheckboxInputControl.java
index 177ae32..a30464b 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/CheckboxInputControl.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/CheckboxInputControl.java
@@ -51,9 +51,18 @@ public class CheckboxInputControl extends InputControl
     public void renderValue(ValueInfo vi, ResponseWriter writer)
         throws IOException
     {
-        boolean value = (Boolean) vi.getValue(true);
+    	Boolean value = (Boolean) vi.getValue(true);
         writer.startElement(HTML_TAG_DIV, null);
-        writer.writeAttribute(HTML_ATTR_CLASS, value ? "eTypeBoolTrue" : "eTypeBoolFalse", null);
+        if (value == null)
+        {
+        	writer.writeAttribute(HTML_ATTR_CLASS, "eTypeBoolNull", null);
+        } else if (value == Boolean.TRUE)
+        {
+        	writer.writeAttribute(HTML_ATTR_CLASS, "eTypeBoolTrue", null);
+        } else
+        {
+        	writer.writeAttribute(HTML_ATTR_CLASS, "eTypeBoolFalse", null);
+        }
         writer.append(HTML_EXPR_NBSP);
         writer.endElement(HTML_TAG_DIV);
     }