|
Re: Detecting changes in a list - without glazedlists [message #1059740 is a reply to message #1059549] |
Tue, 21 May 2013 13:14 |
Dirk Fauth Messages: 2903 Registered: July 2012 |
Senior Member |
|
|
Hi,
searching is implemented independent of GlazedLists as far as I know.
Column based filtering is possible, but you need to implement the filter logic then on your own. I know that somebody achieved this lately, but I'm not sure if there is any documentation on the how anywhere. In the end you need to implement an IFilterStrategy that you register with the filter row.
Talking about databinding and automatic refreshes of changing data in the back, well how do you want to get informed if there is nobody who is able to tell you that. Using plain Java lists, there are no events on changing data in the back. So you would need to implement actions, commands and command handlers that will perform the modification to your list and fire the necessary refresh events to tell the NatTable to rerender. In fact you would implement some kind of databinding yourself, but as there are no events from your list, it is not a real databinding.
GlazedLists is an implementation of the Java list API to make working with collections much faster, giving some additional functionality like e.g. event handling for changes in the list. We are providing an extension that makes use of GlazedLists for some convenience. When I started with NatTable a few years ago, I was also sceptical about using GlazedLists. But today I don't want to miss the features.
If you have a list that already fires events, e.g. a WritableList, you would "simply" need to implement a listener that takes the events from the WritableList and transforms it into NatTable events. But you should be aware of threading and stuff. You could have a look at the GlazedListsEventLayer which is handling the event transformation for GlazedLists.
Greez,
Dirk
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.10989 seconds