pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <de...@meteo.be>
Subject Re: Keeping track of selected items during a refresh
Date Thu, 17 Nov 2011 12:53:15 GMT
Thank you.I had to play with a class that implements listlistener, tabelviewlistener and tableviewselectionlistener,
so i could keep track of selection history. It's working now :) 

----- Mail original -----

De: "Chris Bartlett" <cbartlett.x@gmail.com> 
À: user@pivot.apache.org 
Envoyé: Mercredi 16 Novembre 2011 19:23:44 
Objet: Re: Keeping track of selected items during a refresh 

On 16 November 2011 15:53, David Delbecq <delbd@meteo.be> wrote: 
> Hello, 
> i have the following procedure in place in a pivot application: 
> a tableview is populated using Node extends List<Node>. Each node has 
> several properties (name, date ...) . One of them is a read only unique id 
> (named etag). One of the operations i make requires me to issue a clear() on 
> the List<Node> immediately followed by a repopulation. I'd like all my 
> tableviews (and possibly any other related view using the list) to 
> automatically reselect the Nodes having same ETags as those that were 
> selected before the reloading. Is there any way to achieve this? Some kind 
> of listener in TableView where i could be notified the selection has changed 
> because of a list reloading? 
> Thank you. 

You can add a listener that can perform an action when the TableView's 
entire data source changes. 


That might add/remove a ListListener to the List<Node> which will 
handle the reselection side of things. 

View raw message