Start of Content Area

Background documentation Table Events  Locate the document in its SAP Library structure

Events in View Designer

      onColSelect

Column Selection

Parameter Name

Type

Description

ID

STRING

Standard parameter

CONTEXT_ELEMENT

IF_WD_CONTEXT_ELEMENT

Standard parameter

COL

STRING

Selected column

      onDrop

Assignment of the action to be executed when the user moves an entry or multiple entries in the table by means of Drag&Drop.

Parameter Name

Type

Description

ID

STRING

Standard parameter

CONTEXT_ELEMENT

IF_WD_CONTEXT_ELEMENT

Standard parameter

DATA

STRING

Textual representation of data transported to DropTarget. Along with mimeType, this property forms a link to resources.

MIME_TYPE

STRING

Type of resource.

Note that this property is not currently used; it is intended for future developments.

OFFSET

I

Position where the data is dropped:

      -1 means above the entry

      +1 means below the entry

ROW_ELEMENT

IF_WD_CONTEXT_ELEMENT

Reference to the element that represents the table, that is, the row in which the data is to be dropped.

Caution

The value is 0 if the table is empty.

TAGS

STRING

This property corresponds to flavors in the programming environment. The flavor describes the type of drag and drop description. In a drag and drop operation, you can only drop an object onto another if both have at least one common description.

      onFilter

The display of rows in a table can be restricted using the onFilter action. This can improve the overview of the information contained in a table.

The Table UI element and the TableColumn element provide the application developer with an interface to display a so-called filter row. The filter row is displayed right below the column header area and does not change position when the user browses.

The filtering of table entries requires: 

       The option of specifying a criterion for each table column to restrict the result list

Each table column enables you to bind its filterValue property to a context attribute that defines the value to be filtered. Due to the binding of this property to a context attribute, an input element that can be used to enter the value to be filtered is displayed in the column below the column header area. If the value set is assigned to the attribute, a dropdown box is provided instead of an input field. To use the value set for the filter, this must contain an entry with an initial value to reset the filter. At runtime, the filter input of the user is located in the context attribute to which the property is bound.

       The option to start the filter process

The Table UI element provides the onFilter property, which can be associated with an action. Due to the association with an action, the filter row is displayed in the table. The filter row contains the button as the first element on the left side. When the user chooses this button, the associated action is executed.

Caution

Note the following with regard to the IF_WD_TABLE_METHOD_HNDL~APPLY_FILTER table utility function:

        The dataSource must be bound to a node without subnodes.

        Only static attributes may be attached to this node.

        The RowCount table property, which is now deprecated, may not be used.

        The filter function does not work for hierarchical tables.

You can find an example in the system in the DEMO_TABLE component.

The logic of the filter process is not implemented in Web Dynpro. The application developer must implement the action to be executed.

Parameter Name

Type

Description

ID

STRING

Standard parameter

CONTEXT_ELEMENT

IF_WD_CONTEXT_ELEMENT

Standard parameter

      onLeadSelect

Action executed when a user action changes the LeadSelection in a table (see also selectionChangeBehaviour). The event is not executed if only the selection has been changed.

The use of the onLeadSelect event excludes the use of the onSelect event.

NEW_ROW_ELEMENT or OLD_ROW_ELEMENT are ‘not bound’, if there has not been a lead selection or if the lead selection was deselected by a user interaction.

Parameter Name

Type

Description

ID

STRING

Standard parameter

CONTEXT_ELEMENT

IF_WD_CONTEXT_ELEMENT

Standard parameter

NEW_ROW_ELEMENT

IF_WD_CONTEXT_ELEMENT

Element that the lead selection receives from the user interaction

OLD_ROW_ELEMENT

IF_WD_CONTEXT_ELEMENT

Element that the lead selection had up to this point

ROW

I

Row number

      onScroll

Caution

This event is deprecated. See Data Segments in the Context

Action executed when the user scrolls through the table. (Use this event only for context paging.)

Parameter Name

Type

Description

ID

STRING

Standard parameter

CONTEXT_ELEMENT

IF_WD_CONTEXT_ELEMENT

Standard parameter

NEW_FIRST_VISIBLE_ROW

I

New first visible row

OLD_FIRST_VISIBLE_ROW

I

Old first visible row

      onSelect

Action executed when a user action changes the LeadSelection in a table (more information: selectionChangeBehaviour).

The use of the onSelect event excludes the use of the onLeadSelect event.

Use this event instead of onLeadSelect only if you have to react directly to the (multiple) selection change, for instance, to change the enabled property of a ToolBarButton, since it causes additional roundtrips.

NEW_LEAD_SELECTION or OLD_LEAD_SELECTION are ‘not bound’ if there has not been a lead selection or if the lead selection was deselected by a user interaction. With actions that cause no changes to the lead selection, both parameters contain the current lead selection; they are not bound.

Parameter Name

Type

Description

ID

STRING

Standard parameter

CONTEXT_ELEMENT

IF_WD_CONTEXT_ELEMENT

Standard parameter

NEW_LEAD_SELECTION

IF_WD_CONTEXT_ELEMENT

Element that the lead selection receives from the user interaction

OLD_LEAD_SELECTION

IF_WD_CONTEXT_ELEMENT

Element that the lead selection had up to this point

      onSort

Action executed when the user sorts the table.

Note

Note that onSort_col should be used, and onSort_column should not be used.

Caution

Note the following with regard to the IF_WD_TABLE_METHOD_HNDL~APPLY_SORTING table utility function:

        The dataSource must be bound to a node without subnodes.

        Only static attributes may be attached to this node.

        The RowCount table property, which is now deprecated, may not be used.

        The sort function does not work for hierarchical tables.

You can find an example in the system in the DEMO_TABLE component.

 

Parameter Name

Type

Description

ID

STRING

Standard parameter

CONTEXT_ELEMENT

IF_WD_CONTEXT_ELEMENT

Standard parameter

COL

STRING

ID of the column you want to sort

DIRECTION

WDUI_TABLE_COL_SORT_DIR

Sorting direction

MULTIPLE

WDY_BOOLEAN

Multiple column sorting is active. If you press the CTRL key on a column you can toggle multiple sorting.

 

 

End of Content Area