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 Go to next message
ALex W is currently offline ALex WFriend
Messages: 56
Registered: July 2012
Member
Hello,

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
Re: Simple Comboviewer databinding issue [message #1864486 is a reply to message #1076314] Tue, 19 March 2024 14:03 Go to previous message
Christoph Weber is currently offline Christoph WeberFriend
Messages: 3
Registered: July 2023
Junior Member
Have you found a solution to your problem in the meantime?
Previous Topic:TreeViewer, how to jump say what element to show on top?
Goto Forum:
  


Current Time: Fri Apr 26 23:35:53 GMT 2024

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

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

Back to the top