Show TOC

CheckBoxGroupLocate this document in the navigation structure

Use

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 method SET_SELECTED from IF_WD_CONTEXT_ELEMENT for the relevant context element. Note that the selection of CheckBoxen in a CheckBoxGroup is not carried out using a bound context attribute.

Single Column

Two Column

Three Column

CheckBoxGroup

CheckBoxGroup

CheckBoxGroup

Accessibility

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

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 CheckBoxes 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.

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

Implementation Details

Runtime Class

CL_WD_CHECKBOX_GROUP

Name

Type

Initial Value

Bindable

ID

STRING

(automatic)

No

accessibilityDescription

Translatable text

Yes

activateAccessKey

WDY_BOOLEAN

false

No

colCount

I

1

Yes

contextMenuBehaviour

WDUI_CONTEXT_MENU_BEHAVIOUR

inherit

No

contextMenuId

WDY_MD_UI_ELEMENT_REFERENCE

No

enabled

WDY_BOOLEAN

true

Yes

explanation

Translatable text

No

readOnly

WDY_BOOLEAN

false

Yes

state

WDUI_STATE

normal

Yes

texts

Translatable text

Mandatory

textDirection

WDUI_TEXT_DIRECTION

inherit

Yes

tooltip

Translatable text

Yes

visible

WDUI_VISIBILITY

visible

Yes

width

STRING

Yes

Name

onToggle

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

Dynamic Programming

For dynamic programming, the same properties, events and aggregations are available as in the View Designer. But note that the spelling format and use of upper/lower case is different.

View Designer Name

Runtime Name

Type

accessibilityDescription

ACCESSIBILITY_DESCR

WDY_MD_TRANSLATABLE_TEXT

activateAccessKey

ACTIVATE_ACCESS_KEY

WDY_BOOLEAN

colCount

COL_COUNT

I

contextMenuBehaviour

CONTEXT_MENU_BEHAVIOUR

WDUI_CONTEXT_MENU_BEHAVIOUR

contextMenuBehaviour: inherit

CL_WD_CHECKBOX_GROUP=>E_CONTEXT_MENU_BEHAVIOUR-INHERIT

contextMenuBehaviour: provide

CL_WD_CHECKBOX_GROUP=>E_CONTEXT_MENU_BEHAVIOUR-PROVIDE

contextMenuBehaviour: suppress

CL_WD_CHECKBOX_GROUP=>E_CONTEXT_MENU_BEHAVIOUR-SUPPRESS

contextMenuId

CONTEXT_MENU_ID

WDY_MD_UI_ELEMENT_REFERENCE

enabled

ENABLED

WDY_BOOLEAN

explanation

EXPLANATION

WDY_MD_TRANSLATABLE_TEXT

readOnly

READ_ONLY

WDY_BOOLEAN

state

STATE

WDUI_STATE

state: normal

CL_WD_CHECKBOX_GROUP=>E_STATE-NORMAL

state: required

CL_WD_CHECKBOX_GROUP=>E_STATE-REQUIRED

texts

TEXTS

WDY_MD_TRANSLATABLE_TEXT

textDirection

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

tooltip

TOOLTIP

WDY_MD_TRANSLATABLE_TEXT

visible

VISIBLE

WDUI_VISIBILITY

visible: none

CL_WD_CHECKBOX_GROUP=>E_VISIBLE-NONE

visible: visible

CL_WD_CHECKBOX_GROUP=>E_VISIBLE-VISIBLE

width

WIDTH

STRING

View Designer Name

Runtime Name

onToggle

ON_TOGGLE

Example

For test purposes 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 CheckboxGroup view.