You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by lello <rb...@gmail.com> on 2011/01/26 18:19:56 UTC

Question on dynamic data binding

Hi all,
I have a question/perplexity about dynamic data binding. In ia ListView when
I set the data using setListData(list) is the list is changed the listview
is automatically updated. I could do the same using 
dynamic data binding (am I right?), then what is the difference between the
two methods?
I mean, peformance and so on.

Thanks.
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Question-on-dynamic-data-binding-tp2355544p2355544.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: Question on dynamic data binding

Posted by lello <rb...@gmail.com>.
Many thanks...my confusion in the data biding language comes from my use of
JavaFX where I can "bind" a listview to a list and the language structure is
always the same of other types of binding (i.e. you always use the "bind"
keyword).
Anyway, very very clear.
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Question-on-dynamic-data-binding-tp2355544p2355974.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: Question on dynamic data binding

Posted by Greg Brown <gk...@verizon.net>.
Binding is a word that is unfortunately overused in UI toolkits. Pivot supports four forms of binding:

- Data binding - this uses the load() and store() methods of Component to populate a UI with data from a "bind context" and vice versa. It is generally used to process form data sent to and from a server.

- Data-driven components - components such as ListView and TableView can be "bound" to a data model and are automatically updated when the model state changes.

- Property binding - property binding allows a caller to create an association between a source and target property such that updates to the source are automatically reflected in the target. For example, I could bind the "text" property of a Label to the "text" property of a TextInput - when the user types in the text input, the label's text is updated to match.

- BXML binding - this is used to map named objects in a BXML source file to member variables in a target object, generally via the @BXML annotation.

So, to answer your question, no - you cannot use property binding as a replacement for the model binding used by a data-driven component, because they serve different purposes.

Hope this helps,
G

On Jan 26, 2011, at 12:19 PM, lello wrote:

> 
> Hi all,
> I have a question/perplexity about dynamic data binding. In ia ListView when
> I set the data using setListData(list) is the list is changed the listview
> is automatically updated. I could do the same using 
> dynamic data binding (am I right?), then what is the difference between the
> two methods?
> I mean, peformance and so on.
> 
> Thanks.
> -- 
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Question-on-dynamic-data-binding-tp2355544p2355544.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.