/** * Creates a {@link DataBinder} for a map. * * @param propertyTypes * A collection of name-type pairs describing the properties that can be in map models for the returned * binder. Adding other properties to the model of the returned binder will cause * {@link NonExistingPropertyException NonExistingPropertyExceptions} to be thrown. */ public static DataBinder<Map<String, Object>> forMap( final Map<String, PropertyType> propertyTypes ) { final DataBinder<Map<String, Object>> binder = new DataBinder<>(); binder.proxy = new MapBindableProxy(propertyTypes); return binder; }
/** * Creates a {@link DataBinder} for a map. * * @param propertyTypes * A collection of name-type pairs describing the properties that can be in map models for the returned * binder. Adding other properties to the model of the returned binder will cause * {@link NonExistingPropertyException NonExistingPropertyExceptions} to be thrown. */ public static DataBinder<Map<String, Object>> forMap( final Map<String, PropertyType> propertyTypes ) { final DataBinder<Map<String, Object>> binder = new DataBinder<>(); binder.proxy = new MapBindableProxy(propertyTypes); return binder; }
/** * Creates a {@link DataBinder} for a map. * * @param propertyTypes * A collection of name-type pairs describing the properties that can be in map models for the returned * binder. Adding other properties to the model of the returned binder will cause * {@link NonExistingPropertyException NonExistingPropertyExceptions} to be thrown. */ public static DataBinder<Map<String, Object>> forMap( final Map<String, PropertyType> propertyTypes ) { final DataBinder<Map<String, Object>> binder = new DataBinder<>(); binder.proxy = new MapBindableProxy(propertyTypes); return binder; }
final MapBindableProxy mapProxy = new MapBindableProxy(((MapPropertyType) propertyType).getPropertyTypes()); mapProxy.agent.target = (Map<String, Object>) value; nestedBinder.setModel(mapProxy, StateSync.FROM_MODEL, true);
final MapBindableProxy mapProxy = new MapBindableProxy(((MapPropertyType) propertyType).getPropertyTypes()); mapProxy.agent.target = (Map<String, Object>) value; nestedBinder.setModel(mapProxy, StateSync.FROM_MODEL, true);