empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From der...@apache.org
Subject [1/2] empire-db git commit: improved readonly CheckboxInputControl
Date Mon, 12 Oct 2015 16:12:54 GMT
Repository: empire-db
Updated Branches:
  refs/heads/master 26850838a -> b1b1446dc


improved readonly CheckboxInputControl


Project: http://git-wip-us.apache.org/repos/asf/empire-db/repo
Commit: http://git-wip-us.apache.org/repos/asf/empire-db/commit/824151cf
Tree: http://git-wip-us.apache.org/repos/asf/empire-db/tree/824151cf
Diff: http://git-wip-us.apache.org/repos/asf/empire-db/diff/824151cf

Branch: refs/heads/master
Commit: 824151cffa0ebe37f8a22260915572586d6f4026
Parents: eb3c911
Author: jan <jan@glaubitz.org>
Authored: Wed Sep 30 09:37:15 2015 +0200
Committer: jan <jan@glaubitz.org>
Committed: Wed Sep 30 09:37:15 2015 +0200

----------------------------------------------------------------------
 .../empire/jsf2/controls/CheckboxInputControl.java       | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/empire-db/blob/824151cf/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/CheckboxInputControl.java
----------------------------------------------------------------------
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 2110041..ddfe372 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
@@ -45,6 +45,17 @@ public class CheckboxInputControl extends InputControl
         this(javax.faces.component.html.HtmlSelectBooleanCheckbox.class);
     }
 
+	@Override
+	public void renderValue(ValueInfo vi, ResponseWriter writer)
+		throws IOException
+	{
+		boolean value = (Boolean) vi.getValue(true);
+		writer.startElement("div", null);
+		writer.writeAttribute("class", value ? "eTypeBoolTrue" : "eTypeBoolFalse", null);
+		writer.append("&nbsp;");
+		writer.endElement("div");
+	}
+	
     @Override
     protected void createInputComponents(UIComponent parent, InputInfo ii, FacesContext context,
List<UIComponent> compList)
     {


Mime
View raw message