Twitter github

JFace Databinding is Cool

I have been getting to know JFace Databinding lately. It was on my TODO list of Eclipse technologies to learn and although things were rough in the beginning, I’m starting really appreciate things. For example, I had a use case where I was binding a value to a text control. By default, the model was being updated on every keystroke which could be fine. However, if you have a complex UI that does fancy validation, it can cause unexpected results like refreshes that you just don’t want. A simple and more natural thing is only to commit a change to the model after the user is done typing instead of every keystroke. The solution in JFace Databinding is simple…

SWTObservables.observeDelayedValue(400, myObservable)

There’s also a nice code snippet that you can run to see how the code works.

  • Scott Lewis

    Hi Chris. How about we start work on an ECFDataBindingContext…where the model is partially/fully replicated, and uses something like cola for transforming operations? Seems like it would be pretty easy to do…and pretty useful.

  • Scott Lewis

    Hi Chris. How about we start work on an ECFDataBindingContext…where the model is partially/fully replicated, and uses something like cola for transforming operations? Seems like it would be pretty easy to do…and pretty useful.

  • Boris Bokowski

    Thanks for the kind words! Btw, keep filing bugzillas if you need example snippets to demonstrate certain aspects of the framework.

  • Boris Bokowski

    Thanks for the kind words! Btw, keep filing bugzillas if you need example snippets to demonstrate certain aspects of the framework.