Skip to Content

Usage of CheckboxGroup

Hello,

does anybody know if there's an example of how to use a CheckboxGroup? Unfortunately I couldn't find anything in the tutorials.

I'd like to know a nice way to

- set the names of the check boxes

- have all check boxes selected

- get information if the check boxes have been selected

Thanks,

Christian

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jul 06, 2004 at 06:12 PM

    Hi Christian,

    this is all about context binding and -programming.

    Let context value node A (cardinality 0..n) contain two value attributes "text" (string) and "enabled" (boolean), then the "texts" property of the CheckBoxGroup is bound to A.text, the "enabled" property of the CBG (another new three-letter acronym 😉) is bound to A.enabled.

    You add for example 3 elements to A and set the text and enabled-property of each element accordingly. As a result you'll get 3 checkboxes (no surprise really).

    If you want to have more than one checkbox selected, set the "selection" property of A to 0..n. Which checkbox(es) are selected can be checked by wdContext.nodeA().isMultiSelected(index).

    There's an example describing the data binding here: http://help.sap.com/saphelp_nw04/helpdata/en/95/93fe1e71a2e44691b1f041e67f71aa/frameset.htm

    The CBG is created dynamically there, but anyway this should give you some more hints.

    Hope that helps.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded