EMF Databinding Issue [message #1352483] |
Tue, 13 May 2014 09:40  |
Eclipse User |
|
|
|
Hi,
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.
Cheers,
Javi
|
|
|
|
|
|
Re: EMF Databinding Issue [message #1352852 is a reply to message #1352598] |
Tue, 13 May 2014 13:07  |
Eclipse User |
|
|
|
Hi Ivan,
You are correct. I though i was using 2.2 when i was actually using 2.1.1
So for 2.1.1 i had to use: rwt.remote.Server.getInstance().send()
and if i had understood correctly, when i move to a version 2.2+ I would have to use:
rwt.remote.Connection.getInstance().send()
Thanks again!
Javi
|
|
|
Powered by
FUDForum. Page generated in 0.15065 seconds