|[Databinding] - Custom Widgets [message #560228]
||Tue, 21 September 2010 15:37
Registered: March 2010
Ok Guys, I have been racking my head around this problem for 2 days now and I need your help.|
I wrote a custom widget which consists of a couple of SWT Widgets(Spinner, Text and etc...). Anytime one of these is modified in value an attribute of type long in my widget class is updated.
Now I am using databinding to connect this value to my model. So I wrote a custom WidgetValueProperty with the correct doGetValue/doSetValue methods and my model updates just fine.
The problem I am having is that my bindings all have a change listener attached to them to set my editor's dirty state onchange. The UI elements that have an observable created via SWTObservables all fire a change event when modified. My custom widget does not.
So I am guessing I need to override the wrapObservable method of the WidgetValueProperty but I don't know what I am suppose to put in place of the SWTObservableValueDecorator.
Does anyone have ideas on how to properly implement this?
Powered by FUDForum
. Page generated in 0.02105 seconds