Package org.codehaus.groovy.binding
Class BindingProxy
- java.lang.Object
-
- groovy.lang.GroovyObjectSupport
-
- org.codehaus.groovy.binding.BindingProxy
-
- All Implemented Interfaces:
groovy.lang.GroovyObject,BindingUpdatable
public class BindingProxy extends groovy.lang.GroovyObjectSupport implements BindingUpdatable
This class returns half boundFullBindings on the source half to the model object for every property reference (and I do mean every, valid or not, queried before or not). These returned half bindings are stored strongly in a list when generated. Changing the model will keep all existing bindings but change the source on all of the bininfs Formerly Known as Model Binding.- Since:
- Groovy 1.5
-
-
Constructor Summary
Constructors Constructor Description BindingProxy(Object model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind()Causes automatic updating of bound values to be turned on.ObjectgetModel()ObjectgetProperty(String property)voidrebind()Causes the current bindings to be reset.voidreverseUpdate()If supported, Causes the values to be propagated from the target to the source, If not supported, an exception may be thrownvoidsetModel(Object model)voidsetProperty(String property, Object value)voidunbind()Causes automatic updating of bound values to be turned off.voidupdate()Causes the values to be propagated from the source to the target
-
-
-
Constructor Detail
-
BindingProxy
public BindingProxy(Object model)
-
-
Method Detail
-
getModel
public Object getModel()
-
setModel
public void setModel(Object model)
-
getProperty
public Object getProperty(String property)
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject- Overrides:
getPropertyin classgroovy.lang.GroovyObjectSupport
-
setProperty
public void setProperty(String property, Object value)
- Specified by:
setPropertyin interfacegroovy.lang.GroovyObject- Overrides:
setPropertyin classgroovy.lang.GroovyObjectSupport
-
bind
public void bind()
Description copied from interface:BindingUpdatableCauses automatic updating of bound values to be turned on. This is idempotent between calls to unbind and rebind; i.e. multiple calls to bind will have only the effect of the first call.- Specified by:
bindin interfaceBindingUpdatable
-
unbind
public void unbind()
Description copied from interface:BindingUpdatableCauses automatic updating of bound values to be turned off. This is idempotent between calls to bind and rebind; i.e. multiple calls to unbind will have only the effect of the first call.- Specified by:
unbindin interfaceBindingUpdatable
-
rebind
public void rebind()
Description copied from interface:BindingUpdatableCauses the current bindings to be reset. If the binding is not bound, it is a no-op. If the binding is bound, it will be turned off, then turned on against current values.- Specified by:
rebindin interfaceBindingUpdatable
-
update
public void update()
Description copied from interface:BindingUpdatableCauses the values to be propagated from the source to the target- Specified by:
updatein interfaceBindingUpdatable
-
reverseUpdate
public void reverseUpdate()
Description copied from interface:BindingUpdatableIf supported, Causes the values to be propagated from the target to the source, If not supported, an exception may be thrown- Specified by:
reverseUpdatein interfaceBindingUpdatable
-
-