You need to use the "setSelectedKey()" and "setSelectedBindType()". This sets the field name that is used to either load or store the selected state (a Boolean) of the checkbox. The button data is the text of the checkbox, and that's what "setButtonDataKey()" refers to. Alternatively, you could use "setStateKey()" and "setStateBindType()" but this would require bean methods that accept/return Button.State (this could be used for a tri-state checkbox).
HTH, ~Roger Whitcomb -----Original Message----- From: treponema [mailto:[email protected]] Sent: Saturday, September 22, 2012 2:16 PM To: [email protected] Subject: Is that a way to check or uncheck a checkbox using data binding? Hi, I have a bean with a boolean property. I would like to use data binding to check or uncheck a checkbox regarding this property and get the new state back using the context's load an store methods. The only thing I managed to do, is to change the ButtonData (the text near the checkbox) using setButtonDataKey or by implementing Button.ButtonDataBindMapping. Can someone give me a sample or some explanations ? Thanks...
