Start of Content Area

Background documentation ItemListBox  Locate the document in its SAP Library structure

This UI element is similar to the classical GUI concept of a selection list with simple and multiple selection (list box). A list of text entries is displayed in a box of a fixed size, which if necessary you can scroll through. One or two columns are displayed for the values and possibly one column for symbols is displayed before the value column(s).

In the case of a simple selection, the selected entry is determined by the lead selection of the dataSource. If the user changes the selection, the selectionChangeBehaviour property is adhered to. With multiple selection the selected entries are determined by the dataSource selection only; selectionChangeBehaviour is not considered.

Note

To enable the development of accessible applications the label property is checked during the syntax check.

If no label has been set, and no descriptive text has been specified for the appropriate bound context element in the ABAP Dictionary, the tooltip property is checked.

Example of the Visual Display

This graphic is explained in the accompanying text

 

Runtime Class

CL_WD_ITEM_LIST_BOX

 

Properties in the View Designer

Name

Type

Initial Value

Bindable

ID

STRING

(automatic)

No

activateAccessKey

WDY_BOOLEAN

false

No

contextMenuBehaviour

WDUI_CONTEXT_MENU_BEHAVIOUR

inherit

No

contextMenuId

WDY_MD_UI_ELEMENT_REFERENCE

 

No

dataSource

Context node

 

Mandatory

descriptiveText

Translatable text

 

Yes

descriptiveTextDirection

WDUI_TEXT_DIRECTION

inherit

Yes

enabled

WDY_BOOLEAN

true

Yes

explanation

Translatable text

 

No

iconSource

STRING

 

Yes

multipleSelection

WDY_BOOLEAN

false

Yes

readOnly

WDY_BOOLEAN

false

Yes

selectionChangeBehaviour

WDUI_LEAD_SEL_CHNG_BEHVR

auto

No

text

Translatable text

 

Yes

textDirection

WDUI_TEXT_DIRECTION

inherit

Yes

tooltip

Translatable text

 

Yes

visible

WDUI_VISIBILITY

visible

Yes

visibleItems

I

10

Yes

width

STRING

 

Yes

 

Aggregations in the View Designer

Name

Cardinality

Type

DRAG_SOURCE_INFO

0..1

DragSourceInfo

DROP_TARGET_INFO

0..1

DropTargetInfo

 

Events in the View Designer

Name

onDrop

onLeadSelect

Note

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

        UIElement

        ContextMenuProvider

        ViewElement

Dynamic Programming

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

Dynamic Programming of Properties

View Designer Name

Runtime Name

Type

activateAccessKey

ACTIVATE_ACCESS_KEY

WDY_BOOLEAN

contextMenuBehaviour

CONTEXT_MENU_BEHAVIOUR

WDUI_CONTEXT_MENU_BEHAVIOUR

 contextMenuBehaviour: inherit

CL_WD_ITEM_LIST_BOX=>E_CONTEXT_MENU_BEHAVIOUR-INHERIT

 contextMenuBehaviour: provide

CL_WD_ITEM_LIST_BOX=>E_CONTEXT_MENU_BEHAVIOUR-PROVIDE

 contextMenuBehaviour: suppress

CL_WD_ITEM_LIST_BOX=>E_CONTEXT_MENU_BEHAVIOUR-SUPPRESS

contextMenuId

CONTEXT_MENU_ID

WDY_MD_UI_ELEMENT_REFERENCE

dataSource

DATA_SOURCE

OBJECT

descriptiveText

DESCR_TEXT

WDY_MD_TRANSLATABLE_TEXT

descriptiveTextDirection

DESCR_TEXT_DIRECTION

WDUI_TEXT_DIRECTION

 descriptiveTextDirection: inherit

CL_WD_ITEM_LIST_BOX=>E_DESCR_TEXT_DIRECTION-INHERIT

 descriptiveTextDirection: ltr

CL_WD_ITEM_LIST_BOX=>E_DESCR_TEXT_DIRECTION-LTR

 descriptiveTextDirection: rtl

CL_WD_ITEM_LIST_BOX=>E_DESCR_TEXT_DIRECTION-RTL

enabled

ENABLED

WDY_BOOLEAN

explanation

EXPLANATION

WDY_MD_TRANSLATABLE_TEXT

iconSource

ICON_SOURCE

STRING

multipleSelection

MULTIPLE_SELECTION

WDY_BOOLEAN

readOnly

READ_ONLY

WDY_BOOLEAN

selectionChangeBehaviour

SELECTION_CHANGE_BEHAVIOUR

WDUI_LEAD_SEL_CHNG_BEHVR

 selectionChangeBehaviour: auto

CL_WD_ITEM_LIST_BOX=>E_SELECTION_CHANGE_BEHAVIOUR-AUTO

 selectionChangeBehaviour: manual

CL_WD_ITEM_LIST_BOX=>E_SELECTION_CHANGE_BEHAVIOUR-MANUAL

text

TEXT

WDY_MD_TRANSLATABLE_TEXT

textDirection

TEXT_DIRECTION

WDUI_TEXT_DIRECTION

textDirection inherit

CL_WD_ITEM_LIST_BOX=>E_TEXT_DIRECTION-INHERIT

textDirection ltr

CL_WD_ITEM_LIST_BOX=>E_TEXT_DIRECTION-LTR

textDirection rtl

CL_WD_ITEM_LIST_BOX=>E_TEXT_DIRECTION-RTL

tooltip

TOOLTIP

WDY_MD_TRANSLATABLE_TEXT

visible

VISIBLE

WDUI_VISIBILITY

visible: none

CL_WD_ITEM_LIST_BOX=>E_VISIBLE-NONE

visible: visible

CL_WD_ITEM_LIST_BOX=>E_VISIBLE-VISIBLE

visibleItems

VISIBLE_ITEMS

I

width

WIDTH

STRING

 

Dynamic Programming of Events

View Designer Name

Runtime Name

onDrop

ON_DROP

onLeadSelect

ON_LEAD_SELECT

 

Dynamic Programming of Aggregations

View Designer Name

Runtime Name

Cardinality

DRAG_SOURCE_INFO

DRAG_SOURCE_INFO

0..1

DROP_TARGET_INFO

DROP_TARGET_INFO

0..1

 

Example

You can find examples in the system in the Web Dynpro application, WDR_TEST_UI_ELEMENTS.

 

 

End of Content Area