Tray
Use
The Tray UI element (IWDTray) is a UI element container like the Group UI element container and can be used to group a set of UI elements under one common title. Unlike the Group UI element it provides additional functions. For example, the Tray UI element can be displayed or hidden.
Example of the Visual Display

Performance Issues with Tray Views
If, for the Tray UI element, no action handler has been defined for the event Tray.onToggle, the content is always sent to the browser. The opening and closing of the Tray is handled fully in the browser.
If there is an action handler for the onToggle event, the content of the Tray is only sent to the browser if expanded=true, that is, the Tray is open.
Proceed as follows to ensure that the content of the Tray is sent to the browser only if the Tray is to be opened.
-
Set the initial value of the property "expanded" of the Tray UI element to false.
-
Define an action handler for the Tray.onToggle event.
The content of the Tray will then be sent to the browser only if it is open. This saves time for closed Trays. The phase model of views that have been embedded in a closed tray will be processed nevertheless.
-
When a Tray is first opened, we recommend you execute a navigation in the Tray.onToggle action handler to the view that is displayed in the opening Tray. Then the view will not be instantiated until the Tray is opened.
Implementation Details
|
Runtime Class |
CL_WD_TRAY |
Properties in View Designer
|
Name |
Type |
Initial Value |
Bindable |
|---|---|---|---|
|
STRING |
(automatic) |
No |
|
|
Translatable text |
Yes |
||
|
WDY_BOOLEAN |
false |
No |
|
| ariaLandmark | WDUI_ARIA_LANDMARK | None | Yes |
|
WDUI_CONTEXT_MENU_BEHAVIOUR |
inherit |
No |
|
|
WDY_MD_UI_ELEMENT_REFERENCE |
No |
||
|
WDY_MD_UI_ELEMENT_REFERENCE |
Yes |
||
|
WDUI_TRAY_DESIGN |
transparent |
Yes |
|
|
WDY_BOOLEAN |
true |
Yes |
|
|
WDY_BOOLEAN |
true |
Yes |
|
|
WDY_BOOLEAN |
true |
Yes |
|
|
WDY_BOOLEAN |
false |
No |
|
|
WDY_BOOLEAN |
true |
Yes |
|
|
WDUI_SCROLLING_MODE |
none |
Yes |
|
|
I |
0 |
No |
|
|
I |
0 |
No |
|
| styleClassName | STRING | Yes | |
|
Translatable text |
Yes |
||
|
WDUI_VISIBILITY |
visible |
Yes |
|
|
STRING |
Yes |
Aggregations in the View Designer
|
Name |
Cardinality |
Type |
|---|---|---|
|
0..n |
||
|
1..1 |
||
|
0..1 |
||
|
0..1 |
Events in View Designer
|
Name |
Dynamic Programming
For dynamic programming, the same properties, events, and aggregations as in the View Designer are available. But note that the spelling format and use of upper/lower case is different.
Dynamic Programming of Properties
|
View Designer Name |
Runtime Name |
Type |
|---|---|---|
|
ACCESSIBILITY_DESCR |
WDY_MD_TRANSLATABLE_TEXT |
|
|
ACTIVATE_ACCESS_KEY |
WDY_BOOLEAN |
|
| ariaLandmark | ARIA_LANDMARK | WDUI_ARIA_LANDMARK |
| ariaLandmark: Application | CL_WD_GROUP=>E_ARIA_LANDMARK-APPLICATION | |
| ariaLandmark: Article | CL_WD_GROUP=>E_ARIA_LANDMARK-ARTICLE | |
| ariaLandmark: Banner | CL_WD_GROUP=>E_ARIA_LANDMARK-BANNER | |
| ariaLandmark: Complementary | CL_WD_GROUP=>E_ARIA_LANDMARK-COMPLEMENTARY | |
| ariaLandmark: Contentinfo | CL_WD_GROUP=>E_ARIA_LANDMARK-CONTENTINFO | |
| ariaLandmark: Form | CL_WD_GROUP=>E_ARIA_LANDMARK-FORM | |
| ariaLandmark: Main | CL_WD_GROUP=>E_ARIA_LANDMARK-MAIN | |
| ariaLandmark: Navigation | CL_WD_GROUP=>E_ARIA_LANDMARK-NAVIGATION | |
| ariaLandmark: None | CL_WD_GROUP=>E_ARIA_LANDMARK-NONE | |
| ariaLandmark: Search | CL_WD_GROUP=>E_ARIA_LANDMARK-SEARCH | |
|
CONTEXT_MENU_BEHAVIOUR |
WDUI_CONTEXT_MENU_BEHAVIOUR |
|
|
contextMenuBehaviour: inherit |
CL_WD_TRAY=>E_CONTEXT_MENU_BEHAVIOUR-INHERIT |
|
|
contextMenuBehaviour: provide |
CL_WD_TRAY=>E_CONTEXT_MENU_BEHAVIOUR-PROVIDE |
|
|
contextMenuBehaviour: suppress |
CL_WD_TRAY=>E_CONTEXT_MENU_BEHAVIOUR-SUPPRESS |
|
|
CONTEXT_MENU_ID |
WDY_MD_UI_ELEMENT_REFERENCE |
|
|
DEFAULT_BUTTON_ID |
WDY_MD_UI_ELEMENT_REFERENCE |
|
|
DESIGN |
WDUI_TRAY_DESIGN |
|
|
design: fill |
CL_WD_TRAY=>E_DESIGN-FILL |
|
|
design: plain |
CL_WD_TRAY=>E_DESIGN-PLAIN |
|
|
design: transparent |
CL_WD_TRAY=>E_DESIGN-TRANSPARENT |
|
|
ENABLED |
WDY_BOOLEAN |
|
|
EXPANDABLE |
WDY_BOOLEAN |
|
|
EXPANDED |
WDY_BOOLEAN |
|
|
HANDLE_HOTKEYS |
WDY_BOOLEAN |
|
|
HAS_CONTENT_PADDING |
WDY_BOOLEAN |
|
|
HEIGHT |
STRING |
|
|
HEIGHT_IMPACT |
WDUI_TRAY_HEIGHT_IMPACT |
|
|
heightImpact: heightOfContent |
CL_WD_TRAY=>E_HEIGHT_IMPACT-HEIGHTOFCONTEXT |
|
|
heightImpact: heightOfTray |
CL_WD_TRAY=>E_HEIGHT_IMPACT-HEIGHTOFTRAY |
|
|
SCROLLING_MODE |
WDUI_SCROLLING_MODE |
|
|
scrollingMode: auto |
CL_WD_TRAY=>E_SCROLLING_MODE-AUTO |
|
|
scrollingMode: both |
CL_WD_TRAY=>E_SCROLLING_MODE-BOTH |
|
|
scrollingMode: none |
CL_WD_TRAY=>E_SCROLLING_MODE-NONE |
|
|
SCROLL_LEFT |
I |
|
|
SCROLL_TOP |
I |
|
| styleClassName | STYLE_CLASS_NAME | STRING |
|
TOOLTIP |
WDY_MD_TRANSLATABLE_TEXT |
|
|
VISIBLE |
WDUI_VISIBILITY |
|
|
visible: none |
CL_WD_TRAY=>E_VISIBLE-NONE |
|
|
visible: visible |
CL_WD_TRAY=>E_VISIBLE-VISIBLE |
|
|
WIDTH |
STRING |
|
Dynamic Programming of Events
|
View Designer Name |
Runtime Name |
|---|---|
|
ON_TOGGLE |
Dynamic Programming of Aggregations
Example
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 view Tray.