Monday, November 19, 2007

EMF + Databinding + GWT 1.5 - it works

Since the last time I blogged about the on going work to provide Eclipse-Core-Features for users of GWT some time has elapsed so I thought I should give you an update.

Ed and Boris jumped on the train and try to help me with their indepth knowledge of EMF and Databinding. It's great to have them on board.

Today I managed the first time to use EMF-Core-Modules (EMF-Common und EMF-Ecore) in a GWT-context. There are some rough edges and not everything is working but it's amazing that the newly developed EMF-Databinding-Integration developed in Bug 75625 works nearly out-of-the box.

My GWT-Code looks like this now:

EMFDataBindingContext ctx = new EMFDataBindingContext();

targetObservableValue = GWTObservables.observeText(
textBox, GWTObservables.Change);

modelObservableValue = EMFObservables.observeDetailValue(
Realm.getDefault(),
value,
BrojectPackage.Literals.PROJECT__NAME);

IConstants.BINDING_BUILDER.bindTextValue(
ctx,
targetObservableValue,
modelObservableValue);



I've started an example project you can look at Broject and get the sources from my svn-repository, it's in a very very early stage but you should get the idea.

If you are interested in the work then you should subscribe to the following bugs EMF-Common, EMF-Ecore, Extension to GWT-JRE-Emulation, Core-Databinding.