Entering content frame

Background documentation Legend Locate the document in its SAP Library structure

Methods for Property Handling

One Get- and one Set method exists for the property of a user interface element:

Set and Get Methods

·        The 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 according to the following pattern:
SET_<runtime name of the property>.

Example: table, property: design, method: SET_DESIGN.

·        The get methods return the value of a property or an element.

The name of the method is created according to the following pattern:
GET_<runtime name of the property>.

Example: table, property: design, method: GET_DESIGN.

Data Binding Methods

If a property can, or must be bound to the context, the respective 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 according to the following pattern:
BIND_<runtime name of the property>.

Example: table, property: design, method: BIND_DESIGN.

·        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 according to the following pattern:
BOUND_<runtime name of the property>.

Example: table, property: design, method: BOUND_DESIGN.

Methods for Event Handling

·        The get methods return the value of an event. The name of the method is created according to the following pattern:
GET_<runtime name of the property>.

Example: table, event: onFilter, method: GET_ON_FILTER.

·        The set methods set the value of an event. The name of the method is created according to the following pattern:
SET_<runtime name of the property>.

Example: table, event: onFilter, method: SET_ON_FILTER.

·        The map methods return the parameter mapping for an event. The name of the method is created according to the following pattern:
MAP_<runtime name of the event>.

Example: table, event: onFilter, method: MAP_ON_FILTER.

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 the method is created according to the following pattern:
ADD_<runtime name of the element>.

Example: table, element: table column, method: ADD_COLUMN.

·        The 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 pattern:
GET_<runtime name of the element>.

Example: table, element: table column, method: GET_COLUMN.

·        The has methods test whether aggregated elements exist within this element. The name of the method is created according to the following pattern:
HAS_<runtime name of the elements>.

Example: table, element: table column, method: HAS_COLUMNS.

·        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 pattern:
remove<Name of the element>.

Example: table, element: table column, method: REMOVE_COLUMN.

¡        If you want to remove all the elements, use a method created according to the following pattern:
REMOVE_ALL_<runtime name of the element>

Example: table, element: table column, method: REMOVE_ALL_COLUMNS.

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, then it is set to initial.

UI Element Properties and Their Binding

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

Primary Property

See Primary Property

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

Abbreviation

Description

em

Refers to the size of the font

ex

Refers to the height of the lower case letter x in this element

px

pixel specification This specification depends on the pixel density of the output device

%

Percent specification

Depending on the CSS property this may refer to

·        The size of the inherent element

·        The size of the parent element

·        A general context

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)

·        %

Use percentages prudently. Percentages do not usually work for height specifications. You can however use percentages for width specifications of layout data, for instance, MatrixData to give your screen a horizontal structure, or to take advantage of the full width available.

All percentages refer to the width/height of the surrounding container or layout data.

·        *

Default setting: occupies as much space as required.

·        px (pixel)

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

·        ex (height of the character x)

Specification is relative to the size of the font. We recommend this unit of measure. You can use it for the width of, for instance, 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 long text is to be cut off, use ex specifications for TextViews, DropDown lists, and InputFields.

·        Use * (or no specification) for columns that contain long text so that you can scale with the table, if, for instance, it is 100%. If you specify the width of the table, assign the star to at least one column.

Note

Note that percentage specifications do not work correctly with ScrollContainer/TransparentContainer with scrollingMode not equal to none. Use specifications like ex or px instead.

 

 

Leaving content frame