0
votes

on an xpage I have checkbox control with data-binding to a bean e.g.:

<xp:checkBox text="Agree" value="#{proposalBean.proposal.mailNotify}" checkedValue="YES"/>

In the back-end I load the value from a Notes doc. When I load the xpage I get the correct value, but when I edit the object the value turns to false. It seems that it cannot match the value from the bean ("YES") with the checkedValue.

Is there a bug and a workaround r should I switch to a checkboxgroup control?

1
How does your backend code for the getter and setter look like?Per Henrik Lausten
if (doc.hasItem("ass_MailNotify")){ if (doc.getItemValueString("ass_MailNotify").equals("YES")){ proposal.setMailNotify("true"); } else{ proposal.setMailNotify("false"); } }Patrick Kwinten
values are now stored as YES (text) or "" (emptry text field)Patrick Kwinten
I surrounded a comment block around the checkbox control and then the value in the bean is not updated when switching from read to edit mode. so the control causes it I would think.Patrick Kwinten

1 Answers

0
votes

I had to compute the readonly AND disabled property. I had only the disabled property computed.... :-?

readonly="#{javascript:!proposalBean.editable || proposalBean.locked}"
disabled="#{javascript:!proposalBean.editable || proposalBean.locked}"