|
|
|
Re: emf databinding with unsetable primitive [message #1734487 is a reply to message #1734483] |
Wed, 08 June 2016 16:17 |
Erdal Karaca Messages: 854 Registered: July 2009 |
Senior Member |
|
|
Yes, like that
You need to have two separate strategies target-to-model and model-to-target (have a look at the bindValue() parameter names when setting the strateties, else it might be a no-op (convert from unset value to empty string, then convert from any string to empty string if the feature might not have been set), or keep the target-to-model strategy null as it will be set to a default.
I would suggest to have a look at Lars' data binding tutorial:
http://www.vogella.com/tutorials/EclipseDataBinding/article.html#databinding_converter
Martin Jacob wrote on Wed, 08 June 2016 17:53Yes the converter might be a solution. But you are right I have to
inject the EObject reference and Structural Feature Path.
So I have to add some thing like this when binding :
EMFUpdateValueStrategy strategy = new myEMFUpdateValueStrategy(eObject,
Package.Literals.MY_BOUND_FEATURE);
bindingContext.bindValue(observeTextObserveWidget, ObserveValue,
strategy, strategy);
Right?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03897 seconds