databinding with multiple observables [message #733986] |
Thu, 06 October 2011 04:25  |
Eclipse User |
|
|
|
Hello,
I have a general question of approach. I have a dialog where some
buttons enabled-state depends on several fields in the model object. How
is the typical way of handling this? From the documentation I've read,
databinding is always about connecting *two* observables.
In this concrete case I'm using SWT with databindings to a EMF model
object, and one of the buttons should be enabled if at least one of two
checkboxes as checked/selected.
One solution I can think of (for this case) is to introduce a separate
model field containing the enabled-state of the button and then use
regular EMF notifications to update that field when either one of the
checkboxes changes state.
--
/Jesper
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02740 seconds