Start of Content Area

Background documentation CheckBoxGroup Locate the document in its SAP Library structure

The CheckBoxGroup allows users to select an element from a set of predefined options using the checkbox. The UI element CheckBoxGroup arranges the individual CheckBoxes in single-column or two-column tables.

To display a selected CheckBox in a CheckBoxGroup use the method SET_SELECTED from IF_WD_CONTEXT_ELEMENT for the relevant context element. Note that the selection of checkboxes in a CheckBoxGroup is not carried out using a bound context attribute.

Note

To enable the development of Structure linkaccessible applications, the accessibilityDescription property is checked during the syntax check if the tooltip property is not set.

Examples of the Display

Single Column

Two Column

Three Column

This graphic is explained in the accompanying text

This graphic is explained in the accompanying text

This graphic is explained in the accompanying text

 

Runtime Class

CL_WD_CHECKBOX_GROUP

 

Properties in View Designer

Name

Type

Initial Value

Bindable

ID

STRING

(automatic)

No

Structure linkaccessibilityDescription

Translatable text

 

Yes

Structure linkcolCount

I

1

Yes

Structure linkenabled

WDY_BOOLEAN

true

Yes

Structure linkreadOnly

WDY_BOOLEAN

false

Yes

Structure linktexts

Translatable text

 

Mandatory

Structure linktextDirection

WDUI_TEXT_DIRECTION

inherit

Yes

Structure linktooltip

Translatable text

 

Yes

Structure linkvisible

WDUI_VISIBILITY

visible

Yes

Structure linkwidth

STRING

 

Yes

 

Events in View Designer

Name

Structure linkonToggle

Note

Other properties that can be inherited are defined in the associated higher-level classes. The associated UI elements are:

        Structure linkUIElement

        Structure linkViewElement

Dynamic Programming

For dynamic programming, the same properties, events and aggregations are available as in the View Designer. Bear in mind the different spellings.

Dynamic Programming of Properties

View Designer Name

Runtime Name

Type

Structure linkaccessibilityDescription

ACCESSIBILITY_DESCR

WDY_MD_TRANSLATABLE_TEXT

Structure linkcolCount

COL_COUNT

I

‑{}‑

ENABLED

WDY_BOOLEAN

Structure linkreadOnly

READ_ONLY

WDY_BOOLEAN

Structure linkstate

STATE

WDUI_STATE

 state: normal

CL_WD_CHECKBOX_GROUP=>E_STATE-NORMAL

 state: required

CL_WD_CHECKBOX_GROUP=>E_STATE-REQUIRED

Structure linktexts

TEXTS

WDY_MD_TRANSLATABLE_TEXT

Structure linktextDirection

TEXT_DIRECTION

WDUI_TEXT_DIRECTION

 textDirection: inherit

CL_WD_CHECKBOX_GROUP=>E_TEXT_DIRECTION-INHERIT

 textDirection: ltr

CL_WD_CHECKBOX_GROUP=>E_TEXT_DIRECTION-LTR

 textDirection: rtl

CL_WD_CHECKBOX_GROUP=>E_TEXT_DIRECTION-RTL

Structure linktooltip

TOOLTIP

WDY_MD_TRANSLATABLE_TEXT

Structure linkvisible

VISIBLE

WDUI_VISIBILITY

 visible: none

CL_WD_CHECKBOX_GROUP=>E_VISIBLE-NONE

 visible: visible

CL_WD_CHECKBOX_GROUP=>E_VISIBLE-VISIBLE

Structure linkwidth

WIDTH

STRING

 

Dynamic Programming of Events

View Designer Name

Runtime Name

Structure linkonToggle

ON_TOGGLE

Data Binding

A CheckBoxGroup is a multiple selection displayed as a group of checkboxes on the screen.

The view context must provide the node X that can contain 0 to n values (cardinality=0..n). The context node must contain an attribute y that provides the texts for the checkbox fields. The data type of the context attribute y can be any simple data type – for example, String, int, and so on. The number of checkboxes equals the number of node elements. The selection of the checkboxes is determined by the multiple selection of the node. The texts property of the CheckBoxGroup UI element is bound to the attribute y by assigning the context path of the context y to the texts property.

Note

For more information about the structure of context structures see Context. For information about the data binding model see Data Binding and Mapping, Structure linkData Binding and Structure linkData Binding of UI Element Properties.

Example

You can find examples of this interface element in the system in the Web Dynpro application WDR_TEST_UI_ELEMENTS, and in the component WDR_TEST_EVENTS in the view CheckboxGroup.

 

End of Content Area