In an XPage I have a CheckBox control bound to a property of a bean (called product). If I make that property a boolean like so..
private boolean selected = true;
public boolean isSelected() {
return selected;
};
public void setSelected(boolean selected) {
this.selected = selected;
};
and bind the checkbox using EL as #{product.selected)
then the page initially opens fine but hangs on a partial refresh, however I can't see any errors in the logs.
If I add another wrapper getter/setter in the bean to return a text version like so:
public String getSelectedTxt() {
return String.valueOf(selected);
}
public void setSelectedTxt(String selectedTxt) {
selected = Boolean.parseBoolean(selectedTxt);
}
then bind the checkbox to #{product.selectedTxt}
and make the uncheckedValue="false"
and checkedValue="true"
. It works!
In version 9 it works straight against the boolean version without the need to convert to text.
So the question is does this sound like a bug in 8.5.3 with mapping checkbox controls to boolean values (has anyone done that before?), or am I approaching this the wrong way?