empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject empire-db git commit: EMPIREDB-235 Bugfix
Date Thu, 03 Mar 2016 17:27:27 GMT
Repository: empire-db
Updated Branches:
  refs/heads/master b98c979d1 -> c2ec6bf42


EMPIREDB-235
Bugfix

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

Branch: refs/heads/master
Commit: c2ec6bf429c55c1ec3c7195c25cac293f3379f20
Parents: b98c979
Author: Rainer Döbele <doebele@apache.org>
Authored: Thu Mar 3 18:27:21 2016 +0100
Committer: Rainer Döbele <doebele@apache.org>
Committed: Thu Mar 3 18:27:21 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/empire/jsf2/components/ControlTag.java  | 3 ++-
 .../java/org/apache/empire/jsf2/controls/InputControl.java  | 9 ++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/empire-db/blob/c2ec6bf4/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
index 7abdc10..1139804 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
@@ -506,11 +506,12 @@ public class ControlTag extends UIInput implements NamingContainer
             if (valueComp == null)
             {   // create ValueOutputComponent
                 valueComp = new ValueOutputComponent();
-                valueComp.setRendered(readOnly);
                 parent.getChildren().add(valueComp);
+                valueComp.setRendered(readOnly);
                 if (readOnly)
                     valueComp.encodeAll(context);
             }
+            // render
         } finally {
             creatingComponents = false;
         }

http://git-wip-us.apache.org/repos/asf/empire-db/blob/c2ec6bf4/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
index da45f39..0312294 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
@@ -37,6 +37,7 @@ import org.apache.empire.data.Column;
 import org.apache.empire.exceptions.InvalidArgumentException;
 import org.apache.empire.exceptions.UnexpectedReturnValueException;
 import org.apache.empire.jsf2.app.TextResolver;
+import org.apache.empire.jsf2.components.ControlTag.ValueOutputComponent;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -196,9 +197,11 @@ public abstract class InputControl
             // necessary only inside UIData
             if (resetChildId && child.getId()!=null)
                 child.setId(child.getId());
-            // encode now
-            child.setRendered(rendered);
-            if (rendered)
+            // set rendered
+            boolean valueOutput = (child instanceof ValueOutputComponent);
+            child.setRendered((valueOutput ? !rendered : rendered));
+            // render
+            if (child.isRendered())
                 child.encodeAll(context);
         }
     }


Mime
View raw message