Show TOC

Background documentationMethods and Properties of UI Elements Locate this document in the navigation structure

 

There is one Get method and one Set method for a property of a UI element:

Set and Get Methods
  • Set methods set the value of a property or an element. If a property is readOnly, then this method is not implemented.

    The name of the method is created using the following schema: SET_<runtime name of property>

    Example Example

    Table, property: design, method: SET_DESIGN.

    End of the example.
  • Get methods return the value of a property or an element.

    The name of the method is created using the following schema: GET_<runtime name of property>

    Example Example

    Table, property: design, method: GET_DESIGN

    End of the example.
Data Binding Methods

If a property can, or must be, bound to the context, the associated Bind and Bound methods are available.

  • The Bind methods bind the value of a property to the context element specified by the path.

    The name of the method is created using the following schema: BIND_<runtime name of property>

    Example Example

    Table, property: design, method: BIND_DESIGN.

    End of the example.
  • The Bound methods return the path of the context element to which a property is bound and return NULL if no binding exists.

    The name of the method is created using the following schema: BOUND_<runtime name of property>

    Example Example

    Table, property: design, method: BOUND_DESIGN.

    End of the example.

For more information, see Data Binding Concepts

Methods for Event Handling
  • Get methods return the value of an event. The name of the method is created according to the following schema: GET_<runtime name of event>

    Example Example

    Table, event: onFilter, method: GET_ON_FILTER.

    End of the example.
  • Set methods set the value of an event. The name of the method is created according to the following schema: SET_<runtime name of event>

    Example Example

    Table, event: onFilter, method: SET_ON_FILTER.

    End of the example.
  • The Map methods return the parameter mapping for an event. The name of the method is created according to the following schema: MAP_<runtime name of event>

    Example Example

    Table, event: onFilter, method: MAP_ON_FILTER

    End of the example.
Methods for Aggregations

If an interface element using aggregations can contain other elements, the following methods are available:

  • Two Add methods that add an element.

    • If only the element is transferred as parameter, then the element is added at the and of a list

    • If an index is transferred as well, then this element is transferred at the specified index position.

    The name of both methods is created according to the following pattern: ADD_<runtime name of element>

    Example Example

    Table, element: Table column, method: ADD_COLUMN.

    End of the example.
  • Get methods are used to determine the allocation to the superordinate or subordinate elements. The name of the method is created according to the following schema: GET_<runtime name of elements>

    Example Example

    Table, element: Table column, method: GET_COLUMN.

    End of the example.
  • The Has methods test whether aggregated elements exist within this element. The name of the method is created according to the following schema: HAS_<runtime name of elements>

    Example Example

    Table, element: Table column, method: HAS_COLUMNS.

    End of the example.
  • The Remove methods remove the respective aggregated elements. These are retained, and can later be added to the current element again.

    You can delete individual or all elements.

    • On individual elements, you can either transfer the index or the ID, the method is created according to the following scheme: REMOVE_<runtime name of element>.

      Example Example

      Table, element: Table column, method: REMOVE_COLUMN.

      End of the example.
    • If you want to remove all the elements, use a method created according to the following scheme: REMOVE_ALL_<runtime name of elements>

      Example Example

      Table, element: Table column, method: REMOVE_ALL_COLUMNS

      End of the example.
IDs of View Elements

Use the following characters for the IDs of view elements:

  • Uppercase letters

  • Digits

  • Special characters _ and /

    Use / only in connection with namespaces, that is, an ID can have the following format /<namespace>/<name>, whereby neither <namespace> nor <name> are allowed to contain any / characters.

    Note Note

    IDs must not begin with a numeral.

    End of the note.
Standard Parameters
  • ID

    ID of the UI element to be triggered (that is, the element belonging to the event)

  • CONTEXT_ELEMENT

    CONTEXT_ELEMENT is of type IF_WD_CONTEXT_ELEMENT, which directly contains the pointer to the context element in question. This is the context element of the dataSource of a Table or MultiPane, for which the event has been triggered:

    • If the element is located in a Table, the context element is the element from the row in which the action was triggered (vertical coordinate).

    • If the element is located in a MultiPane, the context element is the element from the pane (cell) in which the action was triggered (vertical coordinate).

    • If the element is neither in a Table nor in a MultiPane, it is set to initial.

UI Element Properties and Their Binding

The Boolean values of Web Dynpro ABAP can be found in domain WDY_BOOLEAN. This domain is used as a substitute for real Boolean types. X stands for true. No entry stands for false.

Forms

You can use a TextView with design=GroupTitle for a form header. To do this you set the surrounding TransparentContainer to isLayout = false, and assign the same text to its accessibilityDescription as for the groupTitle. You have to do this because a TextView with design=GroupTitle cannot be read by the screen reader programs.

Note the following:

Object

Used for

UI element TextView

Sighted users

Property accessibilityDescription

Screen readers

Primary Property

See Primary Property

Properties that do not have to be bound and that can be changed by clients

See Properties Used in MultiPane or TablePopin

Predefining Values of Specific UI Elements in Context of Personalization

As part of personalization end users and administrators can predefine values for certain UI elements. This means, for example, that for a given InputField, the end user or administrator can define a value, then call the context menu, and select the menu option Use Current Value as Default Value. When the system is next started, this value is accepted as if the user had just keyed it in.

Note Note

Predefinition of values is only available if values can actually be entered in the field.

End of the note.

This function is available for the following UI elements and their properties:

Default

UI Element

Property

InputField

value

CheckBox

checked

TextEdit

value

DropDownByKey

SelectedKey

DropDownListBox

SelectedKey

ToolBarDropDownByKey

SelectedKey

ToolBarDropDownListBox

SelectedKey

Data Segments in the Context

See Data Segments in the Context

Numeric Specifications for CSS Sizes

For the frequently used properties, width and height, the specifications in CSS sizes can be made in em, ex, pixel or percentages. You can choose between absolute specifications (for instance, millimeters) and relative specifications (for instance percentage compared to normal). The following abbreviations are available:

Abbreviations for CSS Sizes

Key

Description

em

Reference to the size of the font

ex

Reference to the height of the lower-case letter x in this element

px

Pixel value This value depends on the pixel density of the output device

%

Percentage value

Depending on the CSS property, this can be in relation to:

  • The size of the inherent element

  • The size of the parent element

  • A general context

Note Note

If you do not specify a unit for the CSS size of the width or height, the pixel unit is used automatically.

End of the note.

Note Note

For the UI elements below, the values for width (and height) can only be specified in pixels:

  • BusinessGraphics

  • GeoMap

  • ContextualPanel

  • ValueComparison

End of the note.

More information about numeric specifications for CSS sizes can be found in the Internet, for instance, http://de.selfhtml.org/.

Recommendations for Absolute and Relative Values for Sizes (Height, Width)
  • %

    You can specify percentages for the frequently-used width and height properties to assign your screen a horizontal structure or to use the full available width of the browser window. Keep in mind that the percentage for the width or height of an embedded UI element relates to the width or height of the surrounding container and not to the width or height of the browser window. The width or height percentage for LayoutData of an embedded UI element relates to the layout of the surrounding container.

    For more information, see SAP Note 1266588.

  • px (pixel)

    Note that problems may occur if the user changes the size of the font.

  • ex (height of the character x)

    Value that is relative to the font size. We recommend this unit of measure. You can use it for the width, for example, of a TableColumn.

Recommendations for Tables:

  • Specify a width for the table, for instance, 40ex or 100%.

  • Use tableLayoutFixed to prevent the Table becoming narrower or wider, depending on the content.

  • If the width is known, or you want to truncate long text, use ex specifications for TextViews, DropDown lists, and InputFieldss.

Note Note

With ScrollContainer/TransparentContainer with scrollingMode not equal to none: Percentages do not function correctly. Instread, use specificatins such as ex or px.

End of the note.
Deprecated Objects

Certain functions, UI elements, properties, events and the like are flagged as deprecated in the system. This means the following:

  • The function in question still exists, but should no longer be used

  • As of SAP NetWeaver 7.10 and SAP NetWeaver 7.11, View Designer issues a warning if deprecated properties are used.

  • In most cases, there is a suitable replacement with the same values for the functionality in question. For more information, see the long text for the warning in View Designer (as of SAP NetWeaver 7.10 and SAP NetWeaver 7.11).

We reserve the right to remove deprecated functionalities in later releases.

For more information, see

Deprecated Objects