13.2.2 Creating and Editing Dynamic Actions

Create and edit dynamic actions in Page Designer.

13.2.2.1 Creating a Dynamic Action

Creating a dynamic action involves specifying when the action happens (with optional conditions), what action or actions are performed, and what elements are affected by the action.

Tip:

To learn more about any Property Editor attribute, select the attribute and click the Help tab in the central pane.

To create a dynamic action:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. Click the Dynamic Actions tab in the left pane.

    The Dynamic Actions tab displays with the existing Events types Page Load, Change, Click, and Dialog Close.

  3. Under Dynamic Actions, right-click Events and select Create Dynamic Action.

    Tip:

    You can also right-click one of the existing Events types (Page Load, Change, Click, or Dialog Close), and select Create Dynamic Action.

    The Property Editor adds a dynamic action called New under the group, Not Specified.

    Page Designer indicates what actions are required next. If there is an error, a Messages icon displays. Click the Messages icon to view a dialog listing all the errors. Select an error to highlight the associated attribute in the Property Editor.

  4. In the Property Editor, edit the following Dynamic Action attributes:
    1. Identification, Name - Enter the name of the dynamic action.
    2. Execution , Sequence - Specify the sequence for this component. The sequence determines the order of execution.
    3. Execution , Event Scope - Select the scope of the event. Event Scope determines when the event is evaluated a second or successive time. Options include:
      • Static - Binds the event handler to the triggering element(s) for the lifetime of the current page, but is no longer bound if a triggering element is updated using Partial Page Refresh (PPR).

      • Dynamic - Binds the event handler to the triggering element(s) for the lifetime of the current page, irrespective of any triggering elements being recreated using Partial Page Refresh (PPR).

      • Once - Binds the event handler to the triggering element(s) only once. The dynamic action is not triggered again until after the page has been fully refeshed.

    4. Execution , Static Container (jQuery Selector) - Only displays if Event Scope is Dynamic. Enter the jQuery Selector of a static container for use by this dynamic action.

      You can improve the performance of dynamic actions that have an event scope of Dynamic. This must be an element on the page that itself does not get recreated, but contains the triggering elements that are recreated using Partial Page Refresh (PPR). This element reference needs to be defined as a jQuery selector.

    5. Execution , Type - Choose the type of execution method for the dynamic action. This defines if the actions are fired immediately, debounced, or throttled. Options include:
      • Immediate - Actions are executed immediately.

      • Debounce - Actions are only executed once after a specified time at the end of a single or series of events.

        Example 1: Update a text field if the user has stopped typing for 2 seconds and use the values last entered.

        Example 2: Refresh a region once after a click and ignore all other clicks in the next 5 seconds.

      • Throttle - Actions are executed at timed intervals when the action is fired multiple times.

        Example 1: During scrolling, update the current screen position at least every 2 seconds. The action will continue to fire if the user keeps scrolling.

        Example 2: As a user types, update a text field with the values entered at least every 2 seconds. The action will continue to fire as the user keeps typing.

    6. When, Event - Specify the event that causes the dynamic action to fire. To learn more, see About Dynamic Action Events.
    7. When, Selection Type - Select the type of page element or construct to be used to trigger the event.

      Note:

      Only available if the event selected supports definition of a page element. Selecting any of the following events hides this attribute: Page Load, Page Unload, Resize, Before Page Submit, Orientation Change. All other event types show this field.
    8. Client-side Condition, Type - Optionally select the type of condition you want to control the true and false action processing of the dynamic action. If no client-side condition is defined, only true actions will fire. If a client-side condition is defined, the true action will fire when the condition is met, and the false action will fire when it is not.

      Note:

      Other properties will display conditionally based on the type, to declaratively allow you to define the condition. For example for the condition type Item = Value, you will see an Item and Value property, which will be checked in evaluating the condition.

    Next, define the action that to be performed if the event evaluates to True or False.

  5. To edit an existing action:
    1. Expand the dynamic action node and select an existing action (that is, select either True or False).
    2. In Property Editor, edit the Action attributes.
    3. Identification, Name - Enter the name of the action to help identify what the action does.
    4. Identification, Action - Specify which action you want to perform. To learn more about supported actions, see About Supported Actions or Page Designer Help.
    5. Affected Elements, Selection Type- Select the page components to be affected when this action is executed. Additional options display depending upon the type of component selected.
    6. Execution , Sequence - Specify the sequence for this component. The sequence determines the order of execution.
    7. Execution , Event - Select the appropriate dynamic action event from the available list.
    8. Execution , Fire When Event Result Is - Specify whether this action fires when the triggering element condition is met by selecting True (True Action), or when it is not met by selecting False (False Action). If no condition is specified, only True Actions fire.
    9. Execution , Fire on Initialization - Specify if the action fires on initialization.

      Initialization has a slightly different meaning depending on how the dynamic action is defined. For dynamic actions defined to fire on interactive grid columns, this specifies if the action fires when the interactive grid row is activated for editing. For all other dynamic actions, this specifies if the action fires when the page loads.

  6. To add a new action:
    1. Expand the dynamic action node.
    2. Right-click the dynamic action and select either Create TRUE Action or Create FALSE Action.
    3. Edit the action in the Property Editor as described in the previous step.
  7. Click Save.

13.2.2.2 Editing Dynamic Actions

Once you create a dynamic action, you can modify attributes defined during the creation process, specify attributes not available during the process (such as specifying an Authorization Scheme) and add additional true actions.

Note:

For details about available Dynamic Action attributes and Action attributes, see Creating a Dynamic Action.

To edit a dynamic action:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. Click the Dynamic Actions tab in the left pane. Dynamic actions are organized by events.
  3. Expand the appropriate event and select the dynamic action.

    The Property Editor displays Dynamic Action attributes.

  4. In Property Editor, edit the appropriate Dynamic Action attributes.

    To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the central pane or review

  5. To edit an existing action:
    1. Expand the dynamic action node and select an existing action (that is, select either True or False).
    2. In Property Editor, edit the Action attributes.
  6. To add a new action:
    1. Expand the dynamic action tree.
    2. Right-click the dynamic action and select either Create TRUE Action or Create FALSE Action.
    3. Edit the action in the Property Editor.
  7. Click Save.

13.2.2.3 Defining Dynamic Action Event Scope

After creating the dynamic action, the scope of the action can be modified to trigger only once, for the lifetime of the current page, or until triggering elements are updated by a Partial Page Refresh (PPR).

To specify event scope:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. Click the Dynamic Actions tab in the left pane.
  3. Under Dynamic Actions, select the dynamic action.

    The Property Editor displays attributes for the dynamic action. Attributes are organized in groups.

  4. Execution , Event Scope - Select the scope of the event. Event Scope determines when the event is evaluated a second or successive time. Options include:
    • Static - Binds the event handler to the triggering element(s) for the lifetime of the current page, but is no longer bound if a triggering element is updated using Partial Page Refresh (PPR).

    • Dynamic - Binds the event handler to the triggering element(s) for the lifetime of the current page, irrespective of any triggering elements being recreated using Partial Page Refresh (PPR).

    • Once - Binds the event handler to the triggering element(s) only once. The dynamic action is not triggered again until after the page has been fully refeshed.

  5. Execution , Static Container (jQuery Selector) - Only displays if Sequence is Dynamic. Enter the jQuery Selector, of a static container, for use by this dynamic action.

    You can improve the performance of dynamic actions that have an event scope of Dynamic. This must be an element on the page that itself does not get recreated, but contains the triggering elements that are recreated using Partial Page Refresh (PPR). This element reference needs to be defined as a jQuery selector.

  6. Execution , Type - Choose the type of execution method for the dynamic action. This defines if the actions are fired immediately, debounced, or throttled. Options include:
    • Immediate - Actions are executed immediately.

    • Debounce - Actions are only executed once after a specified time at the end of a single or series of events.

      Example 1: Update a text field if the user has stopped typing for 2 seconds and use the values last entered.

      Example 2: Refresh a region once after a click and ignore all other clicks in the next 5 seconds.

    • Throttle - Actions are executed at timed intervals when the action is fired multiple times.

      Example 1: During scrolling, update the current screen position at least every 2 seconds. The action will continue to fire if the user keeps scrolling.

      Example 2: As a user types, update a text field with the values entered at least every 2 seconds. The action will continue to fire as the user keeps typing.

    Note:

    If a Client-side Condition is defined, it will be evaluated when the dynamic action and itsActions are executed, not when the event fires.
  7. Click Save.

13.2.2.4 About Calling JavaScript Using a Dynamic Action

You can execute JavaScript code by creating a dynamic action.

You can also execute JavaScript code by creating a dynamic action with an Action of type Execute and Set Value. You can also use JavaScript code for the condition of a dynamic action by setting the Client-side Condition type to JavaScript Expression