org.codehaus.groovy.binding
Class ModelBinding

java.lang.Object
  extended by groovy.lang.GroovyObjectSupport
      extended by org.codehaus.groovy.binding.ModelBinding
All Implemented Interfaces:
GroovyObject, BindingUpdatable

public class ModelBinding
extends GroovyObjectSupport
implements BindingUpdatable

Since:
Groovy 1.1
Version:
$Revision: 8239 $
Author:
Danno Ferrin

Constructor Summary
ModelBinding(Object model)
           
 
Method Summary
 void bind()
          Causes automatic updating of bound values to be turned on.
 Object getModel()
           
 Object getProperty(String property)
           
 void rebind()
          Causes the current bindings to be reset.
 void reverseUpdate()
          If supported, Causes the values to be propigated from the target to the source, If not supported, an exception may be thrown
 void setModel(Object model)
           
 void setProperty(String property, Object value)
          Sets the given property to the new value
 void unbind()
          Causes automatic updating of bound values to be turned off.
 void update()
          Causes the values to be propigated from the source to the target
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, invokeMethod, setMetaClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelBinding

public ModelBinding(Object model)
Method Detail

getModel

public Object getModel()

setModel

public void setModel(Object model)

getProperty

public Object getProperty(String property)
Specified by:
getProperty in interface GroovyObject
Overrides:
getProperty in class GroovyObjectSupport
Returns:
the given property

setProperty

public void setProperty(String property,
                        Object value)
Description copied from interface: GroovyObject
Sets the given property to the new value

Specified by:
setProperty in interface GroovyObject
Overrides:
setProperty in class GroovyObjectSupport

bind

public void bind()
Description copied from interface: BindingUpdatable
Causes 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:
bind in interface BindingUpdatable

unbind

public void unbind()
Description copied from interface: BindingUpdatable
Causes 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:
unbind in interface BindingUpdatable

rebind

public void rebind()
Description copied from interface: BindingUpdatable
Causes 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:
rebind in interface BindingUpdatable

update

public void update()
Description copied from interface: BindingUpdatable
Causes the values to be propigated from the source to the target

Specified by:
update in interface BindingUpdatable

reverseUpdate

public void reverseUpdate()
Description copied from interface: BindingUpdatable
If supported, Causes the values to be propigated from the target to the source, If not supported, an exception may be thrown

Specified by:
reverseUpdate in interface BindingUpdatable

Copyright © 2003-2007 The Codehaus. All rights reserved.