Show TOC Start of Content Area

Background documentation AbstractDropDownByKey Locate the document in its SAP Library structure

The AbstractDropDownBy UI element is the abstract base class of all dropdown list box that uses the Key Binding Model for data binding.

The dropdown list box offers a selection list to the user from which to choose one or no entry; it consists of a text field, a pushbutton and a selection list. Any list item already selected is displayed in the text field. When the user chooses the pushbutton, a list of all possible values is displayed.

The set of values that can be selected results from the value set of the data type of the attribute to which the selectedKey property is bound. The description for the value is displayed.

Data Binding

The context provides the content to be displayed within the UI element, the corresponding keys, and the selected key.

The context must provide the node X that can contain 0 to n elements (cardinality=0..n). The node must contain the attribute y, whose data type can contain a value set (set of value/description pairs). The keys of the dropdown list box are the values of this value set. The texts displayed in the selection list are the respective descriptions. The selected key is provided by the current value of the attribute y.

The selectedKey property of the DropDownByKey UI element is bound to the attribute y by assigning the path of the context X.y to the selectedKey property.

 

Runtime Class

CL_WD_ABSTRACT_DROPDOWN_BY_KEY

 

Properties in View Designer

Name

Type

Initial Value

Bindable

id

STRING

(automatisch)

No

enabled

WDY_BOOLEAN

true

Yes

keyVisible

WDY_BOOLEAN

false

Yes

readOnly

WDY_BOOLEAN

false

Yes

selectedKey

STRING

 

Mandatory

state

WDUI_STATE

normal

Yes

textDirection

WDUI_TEXT_DIRECTION

inherit

Yes

tooltip

Text

 

Yes

visible

WDUI_VISIBILITY

visible

Yes

width

STRING

 

Yes

 

Events in View Designer

Name

onSelect

Note

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

        AbstractDropDown

        UIElement

        ViewElement

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

enabled

ENABLED

WDY_BOOLEAN

keyVisible

KEY_VISIBLE

WDY_BOOLEAN

labelFor

LABEL_FOR

STRING

readOnly

READ_ONLY

WDY_BOOLEAN

selectedKey

SELECTED_KEY

STRING

state

STATE

WDUI_STATE

 state: normal

CL_WD_ABSTRACT_DROPDOWN_BY_KEY=>E_STATE-NORMAL

 state: required

CL_WD_ABSTRACT_DROPDOWN_BY_KEY=>E_STATE-REQUIRED

textDirection

TEXT_DIRECTION

WDUI_TEXT_DIRECTION

 textDirection: inherit

CL_WD_ABSTRACT_DROPDOWN_BY_KEY=>E_TEXT_DIRECTION-INHERIT

 textDirection: ltr

CL_WD_ABSTRACT_DROPDOWN_BY_KEY=>E_TEXT_DIRECTION-LTR

 textDirection: rtl

CL_WD_ABSTRACT_DROPDOWN_BY_KEY=>E_TEXT_DIRECTION-RTL

tooltip

TOOLTIP

WDY_MD_TRANSLATABLE_TEXT

visible

VISIBLE

WDUI_VISIBILITY

 visible: none

CL_WD_ABSTRACT_DROPDOWN_BY_KEY=>E_VISIBLE-NONE

 visible: visible

CL_WD_ABSTRACT_DROPDOWN_BY_KEY=>E_VISIBLE-VISIBLE

width

WIDTH

STRING

 

Dynamic Programming of Events

View Designer Name

Runtime Name

onSelect

ON_SELECT

 

 

End of Content Area