Action (TrnForm)

ActionIcon Description

Action nodes are used to create elements the user can click on the resulting web panel to obtain different results. The effect of clicking a particular action is fully customizable by the developer (by coding a specific GeneXus subroutine).

The appearance of an action on the generated transaction varies a lot depending on where the action is located. Real examples of actions can be found in the section "Runtime Appearance".

Runtime appearance

An action can have different runtime appearances depending on the values set to the action's properties. Two examples are shown below.

ActionRuntimeStandaloneImage ActionRuntimeStandaloneButton
Image action Button action

Properties

Category Name Value
General ActionName (Id) The action's Id. Must be unique inside the web panel. This property's value will be used when naming events and subroutines generated by this action.
Caption The text that should be displayed on screen. This value is shown only when the action's image is not set.
Tooltip The tooltip text to be atteched to the action's control. Note: Not applicable for Combobox actions.
NoSkip

When set to true, the action will be shown in the same line as the last one. See NoSkip property.

Important: This property existed until K2BTools 13.2. In K2BTools 14.0 it was replaced by the "Element Relative Position" property.

Element Relative Position

Allows to configure the position of the element relative to the previous element. The possible values are:

  • New row
  • Same cell
  • New cell

For more information read Element Relative Position property

Image The image to be shown when rendering this action.
Alternate Text Alternate Text associated to the image used to display the action.
Confirm Confirm Indicates if the user should be prompted for confirmation before executing the action's code. See Confirm property in actions
Confirm Message The message to be displayed to the user when asking for confirmation. See Confirm property in actions
Appearance Image Class Theme class that should be assigned to the action if an image is set.
Button Class Theme class that should be assigned to the action if no image is set.
Responsive Design Show In Extra Small Determines if the action will be visible when using a device with a screen with a Extra Small size. See Introduction to Responsive Web Design.
Show In Small Determines if the action will be visible when using a device with a screen with a Small size. See Introduction to Responsive Web Design.
Show In Medium Determines if the action will be visible when using a device with a screen with a Medium size. See Introduction to Responsive Web Design.
Show In Large Determines if the action will be visible when using a device with a screen with a Large size. See Introduction to Responsive Web Design.

User subroutines generated by this node

When this node is added, the events part of the parent transaction is updated. Depending on the action's configurations, several events and subroutines will be created inside a fixed slot called "K2BTrnWebForm.Events.Fixed".

Outside that slot, a subroutine called "U_<ActionName>" is generated. The developer should add the action's code inside that subroutine. The routine will be invoked by K2BTools when it is appropriate (i.e.: if the action has confirmation, the subroutine will be called only after the user confirms the action).