Actions on demand
Actions on demand
Section titled “Actions on demand”The supporting dynamic action plug-in can execute the following actions on the end-user demand:
- reset document to on-load CLOB
- update a document in the plug-in session state and APEX session state (Oracle APEX 22.2 onwards)
- upload images without submitting a page with optional JavaScript callbacks
:::note Oracle APEX Global Page 0
The dynamic action plug-in can be implemented on Oracle APEX Global Page to customize cross application plug-in instances. Learn more in guide Oracle APEX global page.
:::
Dynamic Action Attributes
Section titled “Dynamic Action Attributes”The dynamic action implementing the plug-in actions reset value, update CLOB and upload Images on demand can be triggered by any event that suits a developer’s requirements.
Triggering Element
Section titled “Triggering Element”The supporting dynamic actions on demand can be triggered by JavaScript event on any DOM element.
Client-side Condition
Section titled “Client-side Condition”The plug-in monitors which dynamic action branch (true or false) is not rendered due to evaluation of dynamic action attribute client-side condition.
Server-side Condition
Section titled “Server-side Condition”The plug-in monitors whether dynamic action is not rendered due to evaluation of dynamic action attribute server-side condition.
Authorization Scheme
Section titled “Authorization Scheme”The plug-in monitors whether dynamic action is not rendered due to evaluation of dynamic action attribute authorization schemes.
:::tip Action Control List
Using authorization schemes allows building custom plug-in customization based on user’s role in an application. Learn more in guide Action Control List support using dynamic action server-side conditions and dynamic action authorization schemere.
:::
Action Attributes
Section titled “Action Attributes”Wait For Result
Section titled “Wait For Result”The plug-in dynamic actions supports dynamic action attribute Wait For Result allowing a developer to create custom success flow using dynamic actions. When the attribute is:
- Disabled - a next true (or false) action is executed immiedietly.
- Enabled - a next true (of false) action is executed only after the plug-in action is finished.
Stop Execution On Error
Section titled “Stop Execution On Error”The plug-in dynamic actions supports dynamic action attribute Stop Execution On Error. When the attribute is:
- Disabled - when the plug-in action raises an error, a dynamic action execution continues, and next true (or false) action is executed
- Enabled - when the plug-in action raises an error, a dynamic action execution is terminated.
Affected Elements
Section titled “Affected Elements”The plug-in dynamic actions uses dynamic action affected elements to specify page items to be affected by the plug-in action. The affected element must be implementing the Rich Text Editor Pro, otherwise an error is raised. The supporting dynamic action plug-in supports the following affected elements:
- Not set
- Item(s)
- jQuery Selector
The table below describes example result of implementing the plug-in action Update CLOB with affected elements empty.
| Triggering Element Type | Triggering Elemtn | Event | Result |
|---|---|---|---|
| Item | P1_EXAMPLE | change | Whenever a page item P1_EXAMPLE triggers the event change, the page item’s rich text document is updated in session state. |
| Button | BTN_EXAMPLE | click | When button BTN_EXAMPLE is clicked, all plug-in instances on a current are updated in session state. |
| Region | Example | change | Whenever region Example catches the event change, the event target’s rich text document is updated in session state. |
| jQuery Selector | .example | change | Whenever a DOM node with class class .example catches the event change, the event target’s rich text document is updated in session state. |
| JavaScript Expression | document | change | Whenever a page item triggers the event change, the event target’s rich text document is updated in session state. |
Regardless of whether the triggering element is Item, Button, Region, jQuery Selector or JavaScript Expression, the affected elements are always the same - page items specified in affected elements attribute Item(s).
:::note example Update CLOB
For example, when region Example region catches event change, affected elements elements attribute Item(s) is set to P1_AFFECTED_1,P1_AFFECTED_2, then only rich text documents of page items P1_AFFECTED_1 and P1_AFFECTED_2 are updated in the session state.
:::
Regardless of whether the triggering element is Item, Button, Region, jQuery Selector or JavaScript Expression, the affected elements are always the same - page items matching given jQuery Selector specified in affected elements attribute jQuery Selector.
:::note example
When button BTN_EXAMPLE is clicked, and affected elements jQuery Selector is set as .className, the plug-in action is executed only for page items having attribute Advanced / CSS / Class Name set to className.
:::
JavaScript Initialization Code
Section titled “JavaScript Initialization Code”The plug-in uses dynamic action attribute Initialization JavaScript Code to provide extra configuration. For example, action Update CLOB and reset Upload Images on demand supports JavaScript callbacks.
:::note learn more
Each action accepts different value for the attribute Initialization JavaScript Code. Learn more in the plug-in action documentation further in this document.
:::