com.sencha.gxt.legacy.client.binding
Class Bindings

java.lang.Object
  extended by com.sencha.gxt.legacy.client.binding.Bindings

public class Bindings
extends Object

Aggregates one to many field bindings.

Events:
BeforeBind : BindingEvent(source, model)
Fires before binding.
  • source : this
  • model : the model to bind
Bind : BindingEvent(source, model)
Fires after successful binding.
  • source : this
  • model : the binded model
UnBind : BindingEvent(source, model)
Fires after successful unbinding.
  • source : this
  • model : the unbound model

See Also:
FieldBinding

Nested Class Summary
static class Bindings.BindingEvent
           
 
Constructor Summary
Bindings()
          Creates a new bindings instance.
 
Method Summary
 void addFieldBinding(FieldBinding binding)
          Adds a field binding.
 void bind(ModelData model)
          Binds the model instance.
 void clear()
          Clears all fields by setting the value for each field to null.
 FieldBinding getBinding(Field<?> field)
          Returns the field binding for the given field.
 Collection<FieldBinding> getBindings()
          Returns all bindings.
 ModelData getModel()
          Returns the currently bound model;
 void removeFieldBinding(FieldBinding binding)
          Removes a field binding.
 void unbind()
          Unbinds the current model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bindings

public Bindings()
Creates a new bindings instance.

Method Detail

addFieldBinding

public void addFieldBinding(FieldBinding binding)
Adds a field binding.

Parameters:
binding - the binding instance to add

bind

public void bind(ModelData model)
Binds the model instance.

Parameters:
model - the model

clear

public void clear()
Clears all fields by setting the value for each field to null.


getBinding

public FieldBinding getBinding(Field<?> field)
Returns the field binding for the given field.

Parameters:
field - the field
Returns:
the field binding or null of no match

getBindings

public Collection<FieldBinding> getBindings()
Returns all bindings.

Returns:
the collection of bindings

getModel

public ModelData getModel()
Returns the currently bound model;

Returns:
the currently bound model;

removeFieldBinding

public void removeFieldBinding(FieldBinding binding)
Removes a field binding.

Parameters:
binding - the binding instance to remove

unbind

public void unbind()
Unbinds the current model.



Copyright © 2011. All Rights Reserved.