Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Simple Comboviewer databinding issue
Simple Comboviewer databinding issue [message #1076314] Wed, 31 July 2013 06:43
ALex W is currently offline ALex WFriend
Messages: 56
Registered: July 2012

I'm quite new to JFace databinding.
I tried to add some databinding on a custom ComboClass (extending ComboViewer, and reducing the contained type to a single type).
It works great for filling the combo with the available values, but not for the selection.
Here is my code :

ComboViewer source = myCustomCombo...
Model bindings = POJO object...
IObservableValue target = ViewersObservables.observeSingleSelection(source);
IObservableValue model =  BeansObservables.observeValue(bindings, "selection");
bindingContext.bindValue(target, model,null,null);

The field bindings.selection is the same type of the object contained in the combo (so I think I don't need converter).

I also tried the generated method from Windows Builder :

     IObservableValue observeSingleSelectionAxisSelectionCombo = ViewerProperties.singleSelection().observe(source );
        IObservableValue selectedAxisBindingsObserveValue = BeanProperties.value("selection").observe(bindings);
        bindingContext.bindValue(observeSingleSelectionAxisSelectionCombo, selectedAxisBindingsObserveValue, null, null);

Nothing happens on selection. No error, no stacktrace, nothing. I launched in debug, the binding is actually created, but no getter/setter are being called on selection.

Any idea ?? Thanks
Previous Topic:How to make CheckBoxCellEditor read by Screen Reader
Next Topic:Quick find (Ctrl + F) does not work for virtual Table Viewer
Goto Forum:

Current Time: Tue May 22 10:26:46 GMT 2018

Powered by FUDForum. Page generated in 0.01469 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top