pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger L. Whitcomb" <Roger.Whitc...@actian.com>
Subject RE: Is that a way to check or uncheck a checkbox using data binding?
Date Mon, 24 Sep 2012 16:59:34 GMT
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:treponema@orange.fr] 
Sent: Saturday, September 22, 2012 2:16 PM
To: user@pivot.apache.org
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...
Mime
View raw message