pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Whitcomb <RogerandB...@rbwhitcomb.com>
Subject Re: Hi,
Date Wed, 12 Oct 2011 18:39:49 GMT
If you have a List<xxx> as the data for your TableView, then all you need to do is add
an element to your List<xxx> structure and it will show up in the TableView automatically.

That's because when you construct the TableView with the list or use "setTableData(...)" then
the TableView adds itself as a listener to this list, so when changes happen to the list,
the TableView is notified automatically and it can do the appropriate thing.  This is one
of the reasons there are separate org.apache.pivot.collections objects (such as List) -- so
this notification can happen (which is not a feature of the standard java.lang.List objects).

~Roger Whitcomb

On Oct 11, 2011, at 11:22 PM, V SANTOSH PAVAN RAJU BS wrote:

> In my application i have TableView and some rows must be added to it
> dynamically when some event occurs like pressing a button. Can any one help
> me in this regard.
> -- 
> Thanks & Regards
> B.S.V.S.Pavan Raju.
> Skype: skype_pavan1
> Hyderabad.

View raw message