Show TOC

Background documentationDropDownByIndex Locate this document in the navigation structure

 

The Web Dynpro class DropDownByIndex, which implements the IWDDropDownByIndex interface, is the base class of the dropdown list boxes for which index binding is used. The UI element provides the user with a dropdown list box from where the user can select exactly one entry. The UI element consists of a text field, a button, and a selection list. Any list entry already selected is displayed in the text field. When selecting the button, a list with all possible values is displayed.

When using a dropdown list box, always display this UI element alongside a label to ensure accessibility.

Description of UI Element Properties

activateAccessKey

Indicates whether access key for this control is activated. More information: Enabling Access Keys

displayAsText

Specifies, whether the input field looks like a text (in the case it has not the focus).

explanation

Specifies the explanation text. More information: Explanation

labelFor

The DropDownByIndex element can also be used as a label for other UI elements. You can use the labelFor property to reference to a UI element.

readOnly

Specifies whether the user can select an element, or not.

selectionChangeBehaviour

The change of the lead selection can cause a data loss – for example, if the changed or new data was not written to the context due to syntax errors. You can avoid the data loss using the selectionChangeBehaviour property before changing the lead selection: If the data was written to the context, the value auto specifies that the DropDownByIndex automatically changes the lead selection of its data source directly after an interaction by the user before the corresponding event is triggered. manual specifies that the DropDownByIndex does not change the lead selection of its data source after an interaction by the user but triggers the corresponding event. In this case, the event handler must change the lead selection to enable the DropDownByIndex to display the data in a main detail view, for example. This setting allows you to check the change of the lead selection.

size

Property is deprecated.

state

Displays the status of the DropDownByIndex. The state property can take the following values and is represented by enumeration type WDState. normal, required (displayed by an asterisk).

textDirection

Enables the labels for the DropDownByIndex to be read in other languages that require a specific text direction. The textDirection property can take the following values and is represented by enumeration type WDTextDirection.

width

Determines the width of the DropDownByIndex. You can specify this in CSS sizes, such as em, ex, pixels or percentage values.

Events

onSelect (int index)

This event is triggered when the user selects a different list entry from the dropdown box. The newly selected index (starting from zero) is passed as an event parameter.