Control form - Actions tab
Action sets determine the behavior of a control.
Action sets
An action set is a combination of an event and an action configured for a control. An event triggers an action. For example, a mouse click refreshes a section. For each action set, you must define at least one event and one action. You can define multiple events and actions for a single action set. You can create multiple actions sets for a single control. You can also specify a condition for the action set.
Action sets consist of the following elements:
- Event — Something that a user does, such as click, double-click, hover, focus, keyboard entry, and so on.
- Action — A response that the system performs as a result of the user event. For example, when the user clicks a button, a case is created.
- Conditions — Optionally, you can specify restrictions, such as When
conditions, that can be applied to an event and action combination. For example, you can
configure conditions so that hovering over a field displays a tooltip only if the field
contains a property value.
Using When conditions, you can combine behaviors for a single control. For example, a first behavior states that when the user focuses on the Input Area, the system sets the background color to red (defined in the Inline Style field) if the area is populated. A second behavior states that, for the same event, the system sets the background color to blue if the area is empty.
Actions execute from the top down, in the order in which they are listed. The inherited actions (the ones in the rule) execute first. All processing effects of an action in the list will complete before the next action starts. Use the row handles to rearrange the action sets if necessary.
Action sets contain settings to specify the behavior of the control in Read-write and Read-only modes.
UI Gallery
The UI Gallery landing page contains working examples of many controls. For more information, see Accessing the UI Gallery .
Defining behaviors in the Parameters dialog box
When customizing a control in the Parameters tab, you can add but cannot delete or modify behaviors defined in the underlying rule. The rule's behavior appear in a top grid. A bottom grid enables you to add conditions, which you can delete or modify.
Adding actions to custom controls
Custom non-autogenerated controls support the same actions and event types that are available in standard autogenerated controls, which means you can add multiple action sets for different types of events on a custom control. You can use the legacy or standard action type on custom controls and you can add multiple action sets for different types of events on a custom control.
- If an existing non-autogenerated control has actions configured, the legacy action type is selected by default.
- For new custom controls or existing custom controls with no actions only the standard action configuration is shown in the Actions tab.
To generate the required actions markup for non-autogenerated controls include this JSP in the non-autogenerated control HTML:
<pega:include type="fragment" name="pzActionSetAttributes"/>
- Creating an action set
Define an action set to specify what a control does when a user event happens.
- Available actions and conditions
Choose an action from the list, see which options are available for the action and when you can use it. Learn which conditions you can apply.
- Controls form Completing the Controls tab
Pega Platform includes a set of standard auto-generated controls. As a best practice, use these controls to save development time and ensure consistency. By default, this tab is displayed when you open an auto-generated control or open a New rule.
- Custom controls
- Creating an action set
Define an action set to specify what a control does when a user event happens.
- Control form - Actions tab
Action sets determine the behavior of a control.
Previous topic Control form - Completing the Pages & Classes tab Next topic Creating an action set