Start of Content Area

Background documentation ViewSwitch  Locate the document in its SAP Library structure

You can use a ViewSwitch to toggle between various views in a Contextual Panel.

 

Runtime Class

CL_WD_VIEW_SWITCH

 

Properties in View Designer

Name

Type

Initial Value

Bindable

ID

STRING

(automatic)

No

itemEnabled

WDY_BOOLEAN

true

Yes

itemIcon

WDUI_VIEW_SWITCH_ICON

none

Yes

itemSource

Context Node

 

Mandatory

itemText

Translatable text

 

Yes

itemVisible

WDY_BOOLEAN

true

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:

        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

itemEnabled

ITEM_ENABLED

WDY_BOOLEAN

itemIcon

ITEM_ICON

WDUI_VIEW_SWITCH_ICON

 itemIcon: blank

CL_WD_VIEW_SWITCH=>E_ITEM_ICON-BLANK

 itemIcon: news

CL_WD_VIEW_SWITCH=>E_ITEM_ICON-NEWS

 itemIcon: none

CL_WD_VIEW_SWITCH=>E_ITEM_ICON-NONE

 itemIcon: overview

CL_WD_VIEW_SWITCH=>E_ITEM_ICON-OVERVIEW

 itemIcon: report

CL_WD_VIEW_SWITCH=>E_ITEM_ICON-REPORT

 itemIcon: selfService

CL_WD_VIEW_SWITCH=>E_ITEM_ICON-SELF_SERVICE

 itemIcon: work

CL_WD_VIEW_SWITCH=>E_ITEM_ICON-WORK

itemSource

ITEM_SOURCE

OBJECT

itemText

ITEM_TEXT

WDY_MD_TRANSLATABLE_TEXT

itemVisible

ITEM_VISIBLE

WDY_BOOLEAN

 

Dynamic Programming of Events

View Designer Name

Runtime Name

onSelect

ON_SELECT

Example

See the example in ContextualPanel.

 

 

End of Content Area