Show TOC

Background documentationDefine Action Dialog Box Locate this document in the navigation structure

 

The Define Action dialog box contains two tabs:

  • Actions: Enables you to define one or more actions to be performed by the selected control, and the properties of each action.

  • Validation: Enables you to define which controls are validated when an action is performed, and how the controls behave when validation fails.

You display the Define Action dialog box by selecting a control on the Layout board and clicking the browse button next to the Action field in the Configure Element task panel, or by right-clicking a control and choosing Action from the context menu. You can also display the Define Action dialog box by selecting a Popup container on the Design board and clicking the browse button next to the Close action property in the Configure task panel.

The Define Action dialog box contains the following items:

Tab

Item

Description

Actions

Add Action

Opens a list from which you can choose a predefined action. You can also choose Custom Action to define a custom action.

For a description of the predefined actions and their properties, see Predefined Actions and Properties below.

Delete Action

Deletes the currently selected action from the list.

Move Up

Moves the selected action up one place in the list (up one place in the priority order).

Move Down

Moves the selected action down one place in the list (down one place in the priority order).

Rename Action

Renames the currently selected action. You can rename only custom actions and the Submit action.

#

The number of the action in the list. The number defines the priority for each action in a compound action.

Action Name

The name of the action. For a custom action, you specify the action name in this column. When you rename an action, you enter the new name in this column.

Execution mode

When more than one action is defined for a control, specifies when they should be performed. You can choose one of the following options:

  • Sequence: When the compound action is triggered, perform each action in the order it is defined in the list.

  • Switch: When the compound action is triggered, perform the first action in the list that matches the defined condition. After one action has been performed, do not continue with the remaining actions in the list.

Action Properties

The properties for the currently selected action. All actions have the following properties:

  • Action name: The name of the predefined or custom action, in read-only format.

  • Condition: The condition that must be met for the action to be performed. Click the fx button to open the Dynamic Expression Editor dialog box in which you can define the condition.

    More information: Working with Dynamic Expressions

In addition to these properties, some action types have additional properties. For more information, see Predefined Actions and Properties, below.

Validation

Validation scope

Defines the controls that will undergo validation when the action is triggered:

  • None: No validation occurs. For example, you may want to use this scope for a Cancel button, since no validation is needed when a Cancel Window action is triggered.

  • Control: The control for which this action is defined is validated.

  • Element: All controls in the view in which the action is defined are validated.

  • Window: All controls in the window in which the action is defined are validated. For example, if a component contains views such as forms and tables, all of their controls are validated, but not controls in nested components or popups.

Validation Behavior

Defines whether the action should be performed if a control fails validation:

  • Normal: An invalid control prevents the action from being performed, irrelevant of any validation defined for the control in the Behavior field of the Validation group in the Configure task panel.

  • Permissive: An invalid control may or may not prevent the action from being performed, depending on the value defined for the control in the Behavior field of the Validation group in the Configure task panel.

Predefined Actions and Properties

Visual Composer provides a number of predefined actions; each predefined action triggers a specific behavior. The properties displayed in the Action Properties area of the Define Action dialog box differ according to the currently selected action type. The Action name and Condition properties are applicable for all predefined action types (as described in the previous table). Following is a description of each of the actions and their specific properties:

Predefined Action

Properties

Description

Submit

No additional properties

A predefined custom action with no specific behavior. You can use it to perform whichever operation you want.

Back

Navigates to the specified layer of the specified container element. The specified layer must already have been displayed in the application session at runtime, in order for the action to be performed.

Wizard

The wizard to display when the action is performed.

Step

The step of the wizard to display when the action is performed.

Assign

Takes the specified value from the specified view and assigns it to the specified field in the specified view.

From

The view in which the source value is located.

Value

The value to take from the source view and transfer to the target field. The value is an expression and can be composed of multiple fields.

To

The view in which the target field is located.

Target field

The field to which to assign the specified value.

Copy Row(s)/Move Row(s)

Copies or moves the specified row(s) from one view to another.

From

The view from which to copy or move the specified row(s).

To

The view to which to copy or move the specified row(s).

Scope

The rows to be copied or moved. You can choose to copy or move the Current row (the row in which the cursor is located), the Selected rows (the currently highlighted rows), or All rows.

Insert

The location at which to insert the row. You can choose to insert the row Before or After the currently selected row at runtime, or insert it as the First or Last row in the table.

Map Data

Opens the Map Data dialog box so you can map the data between the source and target views. Mapping between fields with identical names is performed automatically.

More information: Map Data Dialog Box

Hyperlink

Opens a specified URL in a new window.

URL

The URL address to open. The URL must start with http:// or https://, for example, http://www.sap.com.

Target

The target window in which to open the URL at runtime.

Clear

Resets the values in the current row of the specified view to the default values.

Apply to

The view in which to reset the current row values to the default values.

Delete Row(s)

Deletes the specified row(s) from the table.

From

The view from which to delete the row(s).

Delete

The rows to delete. You can choose to delete the Current row (the row in which the cursor is located), the Selected rows (the currently highlighted rows), or All rows.

Find Row

Finds the next row in the view that matches the specified condition. The search starts from the current cursor location, and then continues in a cyclic manner.

Find in

The view in which to search for the row.

Find what

The condition that specifies the search criteria. You can either enter a string or click the fx button to open the Dynamic Expression Editor dialog box and define an expression as the criteria.

More information: Working with Dynamic Expressions

Insert Row

Inserts a row at the specified location in the table.

To

The view in which to insert the row.

Insert

The location at which to insert the row. You can choose to insert the row Before or After the currently selected row at runtime, or insert it as the First or Last row in the table.

Sort Rows

Sorts the rows in the view according to a specified criteria.

Apply to

The view whose rows you want to sort.

Sort by

The condition by which to sort the rows. You can either enter a string or click the fx button to open the Dynamic Expression Editor dialog box and define an expression as the condition.

More information: Working with Dynamic Expressions

Cancel Window/Close Window/Open Window

Closes, opens, or cancels (closes and discards any changes) the specified window.

Window

The window on which to perform the specified action.

Print

No additional properties

Displays the runtime application screen in a print preview window from which you can choose to print the screen to any configured printer.

Prompt

Displays a message in a modal dialog box.

Message

The message text to display. You can either enter a string or click the fx button to open the Dynamic Expression Editor dialog box and define the message using an expression.

More information: Working with Dynamic Expressions

Trigger Transition

Performs a transition from one view or layer to another.

From

The source view or layer from which to perform the transition.

To

The target view or layer to which to perform the transition.

Execute

Triggers the specified RemoteObject (EJB service) to activate itself when the defined condition is met.

Component

The RemoteObject to trigger.