This is an automated email from the git hooks/post-receive script. New commit to annotated tag v2.0.0-beta-1 in repository jaxx. See https://gitlab.nuiton.org/nuiton/jaxx.git commit 00068020f877dc881ed42d1d01a61f9440677db8 Author: Tony Chemit <chemit@codelutin.com> Date: Tue Oct 27 10:46:23 2009 +0000 in Util.initContext add a entry in ui context when parentContext is a JAXXOBbject (it will make possible to walk into UI ancestor without using the getParentContainer method --- jaxx-runtime/src/main/java/jaxx/runtime/Util.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jaxx-runtime/src/main/java/jaxx/runtime/Util.java b/jaxx-runtime/src/main/java/jaxx/runtime/Util.java index d3ddceb..7358266 100644 --- a/jaxx-runtime/src/main/java/jaxx/runtime/Util.java +++ b/jaxx-runtime/src/main/java/jaxx/runtime/Util.java @@ -54,6 +54,7 @@ public class Util { * Logger */ static private final Log log = LogFactory.getLog(Util.class); + public static final String PARENT = "parent"; // Maps root objects to lists of event listeners private static Map<Object, WeakReference<List<EventListenerDescriptor>>> eventListeners = new WeakHashMap<Object, WeakReference<List<EventListenerDescriptor>>>(); private static Map<JAXXObject, WeakReference<List<DataBindingUpdateListener>>> dataBindingUpdateListeners = new WeakHashMap<JAXXObject, WeakReference<List<DataBindingUpdateListener>>>(); @@ -121,17 +122,15 @@ public class Util { public static <O> JAXXContextEntryDef<List<O>> newListContextEntryDef(String name) { Class<List<O>> castList = Util.<O>castList(); - JAXXContextEntryDef<List<O>> contextEntryDef = new JAXXContextEntryDef<List<O>>(name,castList); + JAXXContextEntryDef<List<O>> contextEntryDef = new JAXXContextEntryDef<List<O>>(name, castList); return contextEntryDef; } - @SuppressWarnings({"unchecked"}) protected static <O> Class<List<O>> castList() { return (Class<List<O>>) Collections.emptyList().getClass(); } - /** * Method to initialize the context of a ui. * @@ -145,6 +144,11 @@ public class Util { } else { ui.setContextValue(parentContext); } + // if parentContext is a JAXXObject then + // add an special parent entry to can go up + if (parentContext instanceof JAXXObject) { + ui.setContextValue(parentContext, PARENT); + } } public static Object getEventListener(Class<? extends EventListener> listenerClass, final String listenerMethodName, final Object methodContainer, final String methodName) { -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.