Repository: empire-db Updated Branches: refs/heads/master 1e83799fa -> f5717af33
EMPIREDB-232 bugfix: reset client-id inside UIData Project: http://git-wip-us.apache.org/repos/asf/empire-db/repo Commit: http://git-wip-us.apache.org/repos/asf/empire-db/commit/f5717af3 Tree: http://git-wip-us.apache.org/repos/asf/empire-db/tree/f5717af3 Diff: http://git-wip-us.apache.org/repos/asf/empire-db/diff/f5717af3 Branch: refs/heads/master Commit: f5717af33b75e071da86ddd7a3e5557258672011 Parents: 1e83799 Author: Rainer Döbele <[email protected]> Authored: Sun Apr 3 16:45:46 2016 +0200 Committer: Rainer Döbele <[email protected]> Committed: Sun Apr 3 16:45:46 2016 +0200 ---------------------------------------------------------------------- .../apache/empire/jsf2/controls/InputControl.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/empire-db/blob/f5717af3/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 051b777..f64dfa6 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 @@ -179,12 +179,23 @@ public abstract class InputControl try { this.creatingComponents = true; createInputComponents(comp, ii, context, children); + // check + boolean resetChildId = ii.isInsideUIData(); + if (resetChildId && log.isDebugEnabled()) + { // Debug-Info only + UIComponent c1 = comp.getChildren().get(0); + String clientId = c1.getClientId(); + log.debug("Performing ChildId-reset for {}", clientId); + } // add attached objects UIComponent parent = comp; while (!(parent instanceof UIInput)) parent = parent.getParent(); for (UIComponent child : children) - { // check type + { // reset child-id + if (resetChildId && child.getId()!=null) + child.setId(child.getId()); + // check type if (!(child instanceof UIComponentBase)) continue; // add attached objects @@ -209,8 +220,7 @@ public abstract class InputControl { // Encode all for (UIComponent child : comp.getChildren()) - { // reset child-id - // render + { // render if (child.isRendered()) child.encodeAll(context); }
