Entering content frame

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 entry already selected is displayed in the text field. When you select the pushbutton, a list with 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 the View Designer

Name

Type

Initial Value

Bindable

ID

STRING

(automatic)

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 im View Designer

Name

onSelect

Note

Weitere Eigenschaften, die über Vererbung zur Verfügung stehen, sind in den dazugehörigen übergeordneten Klassen definiert. Die dazugehörigen Oberflächenelemente sind:

            AbstractDropDown

            UIElement

    ViewElement

Dynamische Programmierung

Für die dynamische Programmierung stehen dieselben Eigenschaften, Ereignisse und Aggregationen zur Verfügung wie im View Designer. Beachten Sie dabei die unterschiedlichen Schreibweisen.

Dynamische Programmierung der Eigenschaften

View Designer Name

Laufzeitname

Typ

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

 

Dynamische Programmierung der Ereignisse

View Designer Name

Laufzeitname

onSelect

ON_SELECT

 

 

 

Leaving content frame