|[databinding] Whats is the minimum to bind a custom model [message #778522]
||Fri, 13 January 2012 03:41
| Patrik Dufresne
Registered: July 2009
I'm using JFace databinding in my project and I feel I'm not implementing it the right way. I had a look at the BeansProperties factory to create observable for a set of object, but it doesn't fit with my model.
What if the minimum to be implemented to bond a custom model (not beans) to work with JFace databinding? My model allowed me to be notify when an object is changed (in the database). I think I need to implement some kind of SimpleValueProperty, but there is so many different class to implements after that : the native listener, the MapProperty, List property, Set property, etc.
My main usage is to bind Viewer content to my model. Currently, I'm providing a custom IObservableSet as the input ans I use a ObservableSetContentProvider. The problem is the Label provider. I had a look into the ObservableMapLabelProvider and ObservableMapCellLabelProvider, but can't find an easy way to implement an IObservable Map for a property of an IObservableSet. Seams quite complicated and redundant to implement. My guess, there is something mush easier to implement. What is it ?
Powered by FUDForum
. Page generated in 0.01694 seconds