Oracle APEX – Dynamic Actions (Custom Event)

Video Tutorial

Demo : https://apex.oracle.com/pls/apex/f?p=APEXLESSONS:CUSTOM_EVENT

Username : apexlessons

Password : apexlessons

Example 1

1) Create Custom Event Dynamic Action

1) Identification
Name: Custom Event Alert

2) When
Event: Custom
Custom Event: CustomEvent1
Selection Type: JavaScript Expression
JavaScript Expression: document


Add True Action
1)Identification
Action: Alert

2) Settings
Text: Custom event fired successfully.

3) Execution Options
Fire on Initialization: False


2) Create Dynamic Action (To fire custom event dynamic action)

1) Identification
Name: On Click Example 1

2) When
Event: Click
Selection Type: Button
Button: P2_ALERT


Add True Action
1)Identification
Action: Execute JavaScript Code

2) Settings
Code: $.event.trigger(“CustomEvent1”);

3) Execution Options
Fire on Initialization: False


Example 2

1) Create Custom Event Dynamic Action
1) Identification
Name: Custom Event Page Submit

2) When
Event: Custom
Custom Event: CustomEvent2
Selection Type: JavaScript Expression
JavaScript Expression: document


1) Add True Action
1)Identification
Action: Execute JavaScript Code

2) Settings
Code: alert(‘Another Custom event fired.’);

3) Execution Options
Fire on Initialization: False


2) Add True Action
1)Identification
Action: Submit Page

2) Settings
Show Processing: True

3) Execution Options
Fire on Initialization: False


Example 2 Region Static ID: dbclick



Function and Global Variable Declaration
$(“#dbclick”).dblclick(function(){
$.event.trigger(“CustomEvent2”);
});


Leave a Reply

Your email address will not be published. Required fields are marked *