Define DataBinding objects
A DataBinding. is the abstraction of an evaluable expression which might be executed in a BindingEvaluationContext.
A DataBinding is defined in the context of a Bindable., which is the owner of DataBinding
(remember that Bindable references both a BindingFactory and a BindingModel)
A DataBinding might be created using this constructor:
public DataBinding(String unparsed, Bindable owner, Type declaredType, BindingDefinitionType bdType);
For example:
Bindable myBindable = ...; // myBindable should be somewhere initialized
DataBinding<String> myBinding = new DataBinding<String>("person.name",myBindable,String.class,BindingDefinitionType.GET_SET);
Initialize a DataBinding:
whose owner is the
myBindablevariable (aBindableinstance)where declared type (type of expression defined by the binding) is
Stringwhere binding is executable both as readable and settable
where expression is set to
person.nameTo be valid,
myBindablevariable should define:a
BindingModeldeclaring aBindingVariablecalled'person'(suppose that type of this variable is reflected byPersonJava class)a suitable
BindingFactoryallowing to browse'name'from aPersontype (this might be implemented byPersonJava class if this class defines bothgetName()andsetName(String)methods, and ifJavaBindingFactoryis used)Validity of a
DataBindingmight be tested usingisValid()method.
Reference documentation
(overview) Introduction to CONNIE
(advanced) Defining a binding strategy
(programmer) Defining bindable context
(user) Defining DataBinding objects