You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2017/09/17 12:29:48 UTC
[myfaces-trinidad] 05/12: TRINIDAD-1738 - check into the 1.2.12.1.2
branch
This is an automated email from the ASF dual-hosted git repository.
deki pushed a commit to branch 1.2.12.1.2-branch
in repository https://gitbox.apache.org/repos/asf/myfaces-trinidad.git
commit 45c870ea088f99ca9c4c94650c58dfd26d8fa95c
Author: Andrew Robinson <ar...@apache.org>
AuthorDate: Wed Mar 3 19:42:37 2010 +0000
TRINIDAD-1738 - check into the 1.2.12.1.2 branch
---
.../context/RequestContextImpl.java | 25 +++++++++++-----------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java b/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
index c8811fe..b3179e5 100644
--- a/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
+++ b/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
@@ -615,7 +615,7 @@ public class RequestContextImpl extends RequestContext
// _addTargets(_GLOBAL_TRIGGER);
// now do all listeners
- _addTargets(updated);
+ _addTargets(updated, new HashSet<UIComponent>());
}
}
@@ -787,27 +787,28 @@ public class RequestContextImpl extends RequestContext
return lifetimeObj.intValue();
}
- private void _addTargets(UIComponent key)
+ private void _addTargets(
+ UIComponent key,
+ Set<UIComponent> visitedComponents)
{
Map<UIComponent, Set<UIComponent>> pl = _getPartialListeners();
Set<UIComponent> listeners = pl.get(key);
- if (listeners != null)
+ if (listeners != null && !listeners.isEmpty())
{
- // protect from infinite recursion
- pl.remove(key);
+ // protect from infinite recursion by making sure we do not
+ // process the same component twice
+ if (!visitedComponents.add(key))
+ {
+ return;
+ }
- for(UIComponent listener : listeners)
+ for (UIComponent listener : listeners)
{
addPartialTarget(listener);
// This target will be re-rendered, re-render anything that's
// listening on it also.
- partialUpdateNotify(listener);
+ _addTargets(listener, visitedComponents);
}
-
- // TRINIDAD-1545
- // Re-add listeners to the map to accommodate partial targets for different stamps of
- // the same component
- pl.put(key, listeners);
}
}
--
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.