Consider the following Pojo Foo
public class Foo {
boolean boolProp;
public void setBoolProp(boolean boolProp){
this.boolProp = boolProp;
}
public boolean isBoolProp() {
return boolProp;
}
}
then you might assume, that you can databind that with master-detail pattern given a SWT.Button with the following code
IObservableValue uiObs = WidgetProperties.selection().observe(button);
IObservableValue prescObs = PojoProperties.value("boolProp", Boolean.class).
observeDetail(observable);
dbc.bindValue(uiObs, prescObs);
Well this will not work, you actually have to have a method
public boolean getBoolProp() {
return isBoolProp();
}
in your Pojo to make it work.
I am not sure, why this is the case, as one tries to programm according to bean style, where you have the isX and setX for Boolean properties. I am also not sure wether this is different for newer versions of JFace (this is 3.8.0). Just find it worth mentioning, and am hoping for some comments on this 🙂