Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » [Databinding] - Custom Widgets(Creating a custom Observable For Widget)
[Databinding] - Custom Widgets [message #560228] Tue, 21 September 2010 11:37
eshvar60  is currently offline eshvar60
Messages: 51
Registered: March 2010
Member
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?

Thanks
Eugene
Previous Topic:[DataBinding] Removing several elements and ObservableListContentProvider
Next Topic:Adding multiple instances of a same view programmaticaly and with different params
Goto Forum:
  


Current Time: Fri Aug 22 23:41:00 EDT 2014

Powered by FUDForum. Page generated in 0.03081 seconds