|EMF Databinding Issue [message #1352483]
||Tue, 13 May 2014 13:40
| Xavipen Mising name
Registered: March 2011
I am using EMF to model the data. Then on the views I have defined databindings so the views would be updated when the data is changed on the back ground.
As an example an snippet of one of the bindings:
EMFDataBindingContext dataBindingContext = new EMFDataBindingContext();
IObservableValue uiElement = WidgetProperties.text(SWT.Modify).observeDelayed(500, text);
IObservableValue modelElement = EMFProperties.value(attribute).observe(eobject);
EMFUpdateValueStrategy targetToModel = new EMFUpdateValueStrategy(EMFUpdateValueStrategy.POLICY_NEVER);
EMFUpdateValueStrategy modelToTarget = new EMFUpdateValueStrategy(EMFUpdateValueStrategy.POLICY_UPDATE);
dataBindingContext.bindValue(uiElement, modelElement, targetToModel, modelToTarget);
When the View is opened for first time, all fields are updated and showing the right value. However, when I start an Action that modifies the EMF model data, I can see the log messages confirming that the data has been changed in the model but the UI is not updated. If i press the UI then the values in the widgets are changed.
I have put log messages in the Modifiers listeners and they do not get called until i click somewhere on the application.
The polling from the client using org.eclipse.swt.Request.getInstance().send() is working. So, most likely is that I have missed something defining the bindings, but i do not know what can it be.
Powered by FUDForum
. Page generated in 0.02538 seconds