Does the JGoodies list binding support binding list contents to a list object in the model? I know I can add listeners to the list model and domain model and coordinate changes between the two fairly easily, but I wasn't sure if JGoodies would do that. I could only find list binding that dealt with list selection events.
Asked
Active
Viewed 829 times
2 Answers
0
I'd suggest you use GlazedLists. It's really easy to use and works great.
One issue is you have to use one of their classes that implements EventList
; you can't just bind a list model to a pre-existing List
.

Jason S
- 184,598
- 164
- 608
- 970
-
Thanks. I think requiring to use an EventList is problematic in this case though. I have a custom list (that uses checkboxes). – Jeff Storey Feb 16 '10 at 19:40
-
That's not hard to do. Decouple your raw data model from the rendering of your data... typically what I do is have a XXXXBean class to represent the data itself, then I use a custom TableFormat from GlazedLists to control the output of the results for the different fields of the data. I am pretty sure that if a field is a boolean then it automatically displays a checkbox. (if not then you just have to add renderers for checkboxes) – Jason S Feb 16 '10 at 19:43
-
I do have it separated, though I like to keep a separate model that indicates which items are "checkbox selected" (vs the list selection model). I could probably build that functionality into the list model itself rather than giving the list 2 models (the 2 model are the ListModel and the CheckBoxListModel). – Jeff Storey Feb 16 '10 at 20:11
-
But, I will look into GlazedLists, but I think I'm still trying to figure out if the JGoodies binding will do this... – Jeff Storey Feb 18 '10 at 00:39
0
It looks like the LinkedListModel and ArrayListModel do this. I overlooked those before.

Jeff Storey
- 56,312
- 72
- 233
- 406