Action (Pattern)

ActionIcon Description

This node can be used in K2BEntityServices and K2BPrompt to add an action to the generated interface. Typically, this action will invoke a Procedure or a Web Panel to implement the action.

Unlike actions in K2BWebPanelDesigner, this node allows the developer to choose in which area of the interface the action should be placed. See Position property in actions for more information.

Runtime Appearance

An example is shown below. Please note that the runtime sceenshot includes more actions, as standard actions are included by default.

ActionsDefinition ActionsSectionRT
Actions Definition Actions Runtime Appearance

Properties

Category Name Value
General Action Name (Id) The action's Id. Must be unique inside the interface. This property's value will be used when naming events and subroutines generated by this action.
GXObject References the GeneXus Object that implements this action.
Caption The text that should be displayed on screen. This value is used only when the "Image" property is set to "(none)".
Image The image to be shown when rendering this action. Not available when the action is inside a ComboAction.
Disable Image The image to be shown when rendering this action when it is disabled. Not available when the action is inside a ComboAction.
Position *

Position in the interface where this action will be shown. See Position property in actions for more information. Not available when the action is inside a ComboAction.

Warning: The "Position" property was named "Layout" in K2BTools 11.1 and prior versions.

Condition Contains a condition which will determine in runtime if the action should appear as disabled or not.
Tooltip The tooltip text to be atteched to the action's control. Note: Not applicable for Combobox actions. Not available when the action is inside a ComboAction.
Alternate Text Alternate Text that should be associated to the image (only applicable when the Image property is set to a value different from "(none)"). Not available when the action is inside a ComboAction.
Target Target

Determines how the action will be opened. Possible options are:

  • Standard: Opens in the same browser tab (default)
  • Pop Up: Opens in a Window inside the current tab.
  • _blank: Opens in a new browser window.
Pop Up Autoresize Only available when the "Target" property is set to "Pop Up". Sets the value for the Autoresize property of the Pop Up Window. The default value for this property is read from K2BTools General Settings
Pop Up Height Only available when the "Target" property is set to "Pop Up". Sets the value for the Height property of the Pop Up Window. The default value for this property is read from K2BTools General Settings
Pop Up Width Only available when the "Target" property is set to "Pop Up". Sets the value for the Width property of the Pop Up Window. The default value for this property is read from K2BTools General Settings
Appearance Image Class Theme class that should be set to the action, when an image is set. If no class is specified, the default value is inferred from K2BEntityServices Settings or K2BPrompt Settings. Not available when the action is inside a ComboAction.
Column Width Only available when the "Image" property is set and the "Layout" property is set to "InGrid". Determines the width of the column that contains the action in the grid. Not available when the action is inside a ComboAction.
Button Class Theme class that should be set to the action, when no image is set. If no class is specified, the default value is inferred from K2BEntityServices Settings or K2BPrompt Settings. Not available when the action is inside a ComboAction.
Row Selection Row Selection

Indicates if the action should receive information about the selected items in the grid it belongs to. Possible values are:

  • None: If the action should not receive any information about the selected rows in the grid.
  • Single: If the action should receive which row is selected, and is designed to receive one row only.
  • Multiple: If the action should receive which rows are selected, and can handle multiple selections at once.

For more information on how this property should be used, see Row selection in actions

Note: This property is only available in action nodes inside a Grid node node but not inside columns (outside the actual grid).

Row Selection Scope Determines if the action will be executed for all selected rows or only to the selected rows that are visible in the grid.
Clear Selection After Action Execution If set to true, the selected items collection will be emptied after the action's execution.
Error Not Selected Lines If set to true, when executing this action, if the "Row Selection" property is set to "Single" or "Multiple" and no items from the grid are selected, an error message will be shown, with the message defined in the "Error Message" property.
Error Message Error message that should be shown when the end user has not selected any rows and the action has "Row Selection" set to "Single" or "Multiple".
Show Action Only If Available Determines if the action will be visible always, or only when the current selection on the grid matches the criteria set in the "Row Selection" property.
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
Behaviour Event Begin Code Code that must be included in the action's event (after security verification). Only available if GXObject is set.
Event End Code Code that must be included in the action's event (after object execution). Only available if GXObject is set.
Security Entity Name The name of the entity which will be used to check authorization when entering the web panel. See K2BTools Security Model
Transaction Name The name of the transaction which will be used to check authorization when entering the web panel. See K2BTools Security Model
Standard Activity Type If applicable, the activity type which will be used to check authorization when entering the web panel (standard activity types only). See K2BTools Security Model
Activity Name The Activity Name that should be associated with the action when checking if the user has permission to access the action. See K2BTools Security Model.
Advanced Refresh Grid If set to true, the grids present in the current interface (if any) will be refreshed after executing the action.
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. Not available when the action is inside a ComboAction.
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. Not available when the action is inside a ComboAction.
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. Not available when the action is inside a ComboAction.
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. Not available when the action is inside a ComboAction.

Child nodes

ArgumentsIcon Arguments              

 

USING "ARGUMENTS" NODES:

When the GXObject object includes parameters, Arguments nodes may be included to instantiate those parameters. In order to do so, an Arguments node must be added as a child of the Action node, and Argument nodes must be added to that node. The amount of Argument nodes must match the amount of parameters in the object. Each Argument node must specify a value for the corresponding parameter in its "Value" property.