private Binding createBinding(final Object component, final String property, final Converter converter, final Supplier<Map<Class<? extends GwtEvent>, HandlerRegistration>> handlerRegistrar) { final Binding binding = new Binding(property, component, converter, handlerRegistrar.get()); bindings.put(property, binding); if (propertyTypes.get(property).isList()) { if ("this".equals(property) && proxy instanceof BindableListWrapper) { addHandlersForBindableListWrapper("this", (BindableListWrapper) proxy); } else { proxy.set(property, ensureBoundListIsProxied(property)); } } return binding; }
private Binding createBinding(final Object component, final String property, final Converter converter, final Supplier<Map<Class<? extends GwtEvent>, HandlerRegistration>> handlerRegistrar) { final Binding binding = new Binding(property, component, converter, handlerRegistrar.get()); bindings.put(property, binding); if (propertyTypes.get(property).isList()) { if ("this".equals(property) && proxy instanceof BindableListWrapper) { addHandlersForBindableListWrapper("this", (BindableListWrapper) proxy); } else { proxy.set(property, ensureBoundListIsProxied(property)); } } return binding; }
/** * Ensures that the given list property is wrapped in a * {@link BindableListWrapper}, so changes to the list become observable. * * @param property * the name of the list property * * @return a new the wrapped (proxied) list or the provided list if already * proxied */ private List ensureBoundListIsProxied(final String property) { final List oldList = (List) proxy.get(property); final List newList = ensureBoundListIsProxied(property, oldList); if (oldList != newList) updateWidgetsAndFireEvent(true, property, proxy.get(property), newList); return newList; }
/** * Ensures that the given list property is wrapped in a * {@link BindableListWrapper}, so changes to the list become observable. * * @param property * the name of the list property * * @return a new the wrapped (proxied) list or the provided list if already * proxied */ private List ensureBoundListIsProxied(final String property) { final List oldList = (List) proxy.get(property); final List newList = ensureBoundListIsProxied(property, oldList); if (oldList != newList) updateWidgetsAndFireEvent(true, property, proxy.get(property), newList); return newList; }
value = agent.ensureBoundListIsProxied(key, (List<?>) value);
value = agent.ensureBoundListIsProxied(key, (List<?>) value);