SlideShare a Scribd company logo
Practical
Dynamic Actions – Intro
Jorge Rimblas
1 . 1
Jorge Rimblas
Senior APEX Consultant
@rimblas
rimblas.com/blog
Oracle DB since 1995
APEX since it was HTMLDB in 2004
Always involved in web technologies
jrimblas in OTN Forums
Contributor to
"Expert Oracle Application Express, 2nd Edition"
with "Themes & Templates" chapter
1 . 2
Age: 13 years!
Staff: 80+ employees
68 consultants/developers
2015: 60% Growth
APEX Solutions: 12 Years!
Largest APEX practice in North America
Oracle Center of Excellence
1 . 3
Agenda
Browser events
Dynamic Action Structure
Demos
AJAX
Advanced Dynamic Actions
2
Background
3 . 1
Your static web pages are
"alive"
3 . 2
Ok, maybe not "alive", but
they are not just static.
3 . 3
JavaScript can affect the structure
(this means changing the HTML)
With
3 . 4
JavaScript can affect the look
(this means changing the CSS and Styles)
With
3 . 5
Definitions
3 . 6
Client Side
3 . 7
Client Side
Server Side
3 . 8
Dynamic Actions
are all about
Client Side
" " Eventsactivities
4
Browser
Events
5 . 1
Click
Change
Key Press
Page Load
Scroll
Resize
5 . 2
Any Browser Event
5 . 3
Custom Events!
5 . 4
Browser Events
4.2 5.0
5 . 5
APEX
4.2
APEX
5.0
5 . 6
Actions
6 . 1
Component Actions
Hide/Show
Disable/Enable
Clear
Set Value
etc...
6 . 2
Style Actions
Set Class
Remove Class
Set Style
6 . 3
Navigation Actions
Submit Page
Cancel Dialog
Close Dialog
APEX 5
6 . 4
Notification Actions
Alert
Confirm
6 . 5
"Other" Actions
Execute JavaScript Code
Execute PL/SQL Code
Plugins
etc...
More about
this later
6 . 6
Anatomy of a
Dynamic Action
7 . 1
When event
What to do?
What to do?
When
True
When
False
[Optional Client Side Condition]
[Affected Elements]
[Affected Elements]
7 . 2
When event
True Actions
False Actions
When
True
When
False
[Optional Client Side Condition]
7 . 3
Anatomy of a
Dynamic Action
APEX view
8 . 1
Event/When?
When will the Dynamic Action
execute?
On click
On item (data) change
On Focus
On Page Load
On (any) browser event
etc
8 . 2
Where?
Where will the event happen?
8 . 3
Where?
Where will the event happen?
Item(s)
Button
Region
jQuery Selector
JavaScript Expression
8 . 4
APEX 4.2 vs APEX 5.0
8 . 5
Demo:Hide
&Show
9 . 1
Two Buttons to Hide/Show
P11
9 . 2
Builder Tabs
9 . 3
P20
9 . 4
With No Dynamic Actions
P20
9 . 5
Show Text Item "Enter User"
Hide List Item "Select User"
Show "Switch to Select User" Button
Hide "Switch to Enter User" Button
Show List Item "Select User"
Hide Text Item "Enter User"
Show "Switch to Enter User" Button
Hide "Switch to Select User" Button
9 . 6
Disable & Enable
Sometimes a good alternative to Hide & Show
9 . 7
Demo:Hide
&Show
•Conditional•
10 . 1
P25
10 . 2
Structure
Condition
10 . 3
Condition Detail
Condition
10 . 4
Several Condition Options
10 . 5
Demo:Set
Value
11 . 1
P30
11 . 2
Often used as part of several True Actions.
Often used to set a hidden item
Hidden Item needs: "Value Protected" = No
$s("{ITEM}", "{VALUE}");
// Set to today
$s("P30_LOG_DATE", "&P30_TODAY.");
// Clear date
$s("P30_LOG_DATE", "");
Equivalent to $s API
11 . 3
Demo:
Uppercase Code
Key
Release
12 . 1
P40
12 . 2
Event
Set Value action
12 . 3
Name to Uppercase Code
this.triggeringElement.value
.toUpperCase()
.replace(/s+/g, '_')
.substring(0, 20);
1. Value of the triggeringElement
2. Make it uppercase
3. Globally Replace spaces (s) with "_"
4. Only return the first 20 characters
12 . 4
Demo:Change
&
Refresh
13 . 1
P110
13 . 2
Don't forget:
Page Items to Submit
13 . 3
Inspect Submission
13 . 4
P110_DEPTNO is sent
13 . 5
AJAX
asynchronous JavaScript and XML
group of interrelated Web development
techniques used on the client-side to create
asynchronous Web applications
Wikipedia: en.wikipedia.org/wiki/Ajax_(programming)
14 . 1
Client Side
Server Side
AJAX
14 . 2
JavaScript
SQL
PL/SQL
14 . 3
Demo: AJAXDemo:
15 . 1
Multiple Actions
It's easy!
15 . 2
P215
15 . 3
Two Different DA
1. Assign Role
2. Remove Role
15 . 4
Assign Role
1. Event: On Button Click
2. Insert new role
3. Refresh Role Dropdown
4. Refresh Report
insert into app_user_roles
( username
, role_key)
values
( :P215_USERNAME
, :P215_ROLE_KEY);
15 . 5
Remove Role
1. Event: On .deleteRow Click
2. Delete role
3. Refresh Role Dropdown
4. Refresh Report
delete
from app_user_roles
where id = :P215_UR_ID;
15 . 6
Remove Role
1. Event: On .deleteRow Click
2. Ask for Confirmation
3. Use "Set Value" to save ID of clicked row
4. Delete role
5. Give Confirmation
6. Refresh Role Dropdown
7. Refresh Report
15 . 7
Get the ID value
this.triggeringElement.getAttribute("data-id");
this.triggeringElement.dataset.id
15 . 8
Get the ID value
this.triggeringElement.dataset.id
15 . 9
Dataset / Data Attributes
// data-id="{value}"
this.triggeringElement.dataset.id
// data-active="YES"
this.triggeringElement.dataset.active
// data-selected="YES"
this.triggeringElement.dataset.selected
// data-lineID="123"
this.triggeringElement.dataset.lineID
// data-rownum="2"
this.triggeringElement.dataset.rownum
15 . 10
Event Scope
Static
Dynamic
Once
16 . 1
Static
Dynamic
Once
16 . 2
Advanced
Dynamic
Actions
17 . 1
this.triggeringElement
this.browserEvent
this.data
Built-in JavaScript Objects
17 . 2
triggeringElement
Available inside the DA JavaScript
var el = this.triggeringElement;
var $el = $(this.triggeringElement);
18 . 1
Name to Uppercase Code
this.triggeringElement.value
.toUpperCase()
.replace(/s+/g, '_')
.substring(0, 20);
1. Value of the triggeringElement
2. Make it uppercase
3. Globally Replace spaces (s) with "_"
4. Only return the first 20 characters
18 . 2
Complex Page
APEX 4.2
19 . 1
Complex Page
APEX 5.0
19 . 2
Resources
Demo [ ]
(
)
Install & Review Packaged Application:
"Sample Dynamic Actions"
apex.oracle.com/pls/apex/f?p=90770 Download
JavaScript.com
dynamic-actions.com
Easy Prototyping with triggeringElement
rimblas.com/blog/2014/06/easy-prototyping-when-using-apex-da-
triggeringelement/
20 . 1
Sample Dynamic Actions
20 . 2
20 . 3
@rimblas
Q&A
Practical Dynamic Actions
Jorge Rimblas
rimblas.com/blog
21
22

More Related Content

What's hot (20)

PDF
RESTful services and OAUTH protocol in IoT
Yakov Fain
 
PPTX
Introduction to AngularJS Framework
Raveendra R
 
PPTX
Building user interface with react
Amit Thakkar
 
PDF
Integrating consumers IoT devices into Business Workflow
Yakov Fain
 
PDF
An introduction to AngularJS
Yogesh singh
 
PPTX
React JS: A Secret Preview
valuebound
 
PPTX
Introduction to Android Programming
Raveendra R
 
PDF
A comprehensive guide on developing responsive and common react filter component
Katy Slemon
 
PPTX
Point and Click App Building Workshop
Salesforce Developers
 
ODP
code-camp-meteor
meghna gogna
 
PPT
ASP.NET AJAX with Visual Studio 2008
Caleb Jenkins
 
PDF
Salesforce Lightning Components Workshop
Christophe Coenraets
 
DOCX
Creation of simple application using - step by step
priya Nithya
 
PPTX
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
PDF
Google Cloud Messaging
Ashiq Uz Zoha
 
PPT
Introduction to Vaadin
Jeroen Benats
 
PPT
ASP.NET AJAX Basics
petrov
 
PPTX
Angular2 and TypeScript
David Giard
 
PDF
Lean Quality & Engineering
Mek Srunyu Stittri
 
PDF
Introduction to React for Frontend Developers
Sergio Nakamura
 
RESTful services and OAUTH protocol in IoT
Yakov Fain
 
Introduction to AngularJS Framework
Raveendra R
 
Building user interface with react
Amit Thakkar
 
Integrating consumers IoT devices into Business Workflow
Yakov Fain
 
An introduction to AngularJS
Yogesh singh
 
React JS: A Secret Preview
valuebound
 
Introduction to Android Programming
Raveendra R
 
A comprehensive guide on developing responsive and common react filter component
Katy Slemon
 
Point and Click App Building Workshop
Salesforce Developers
 
code-camp-meteor
meghna gogna
 
ASP.NET AJAX with Visual Studio 2008
Caleb Jenkins
 
Salesforce Lightning Components Workshop
Christophe Coenraets
 
Creation of simple application using - step by step
priya Nithya
 
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
Google Cloud Messaging
Ashiq Uz Zoha
 
Introduction to Vaadin
Jeroen Benats
 
ASP.NET AJAX Basics
petrov
 
Angular2 and TypeScript
David Giard
 
Lean Quality & Engineering
Mek Srunyu Stittri
 
Introduction to React for Frontend Developers
Sergio Nakamura
 

Similar to Practical Dynamic Actions - Intro (20)

PPT
Silverlight 2 for Developers - TechEd New Zealand 2008
Jonas Follesø
 
PPT
JavaScript and DOM Pattern Implementation
davejohnson
 
PPTX
Take Your XPages Development to the Next Level
balassaitis
 
PDF
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
Innomatic Platform
 
PPT
Week 8
A VD
 
PDF
Gain more freedom when migrating from Camunda 7 to 8.pdf
Phactum Softwareentwicklung GmbH
 
PPTX
Windows Store app using XAML and C#: Enterprise Product Development
Mahmoud Hamed Mahmoud
 
PPTX
An Introduction to Web Components
Red Pill Now
 
PDF
Going web native
Marcus Hellberg
 
KEY
Mobile optimization
purplecabbage
 
PPT
Hnd201 Building Ibm Lotus Domino Applications With Ajax Plugins
dominion
 
PPTX
Rits Brown Bag - Salesforce Lightning
Right IT Services
 
PDF
Kogito: cloud native business automation
Mario Fusco
 
PDF
Being Epic: Best Practices for Android Development
Reto Meier
 
PDF
The fundamental problems of GUI applications and why people choose React
Oliver N
 
PDF
A gently introduction to AngularJS
Gregor Woiwode
 
PDF
Oracle MAF real life OOW.pptx
Luc Bors
 
PPTX
Client Actions In Odoo 17 - Odoo 17 Slides
Celine George
 
PPTX
Angular Js Basics
أحمد عبد الوهاب
 
PPTX
5 x HTML5 worth using in APEX (5)
Christian Rokitta
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Jonas Follesø
 
JavaScript and DOM Pattern Implementation
davejohnson
 
Take Your XPages Development to the Next Level
balassaitis
 
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
Innomatic Platform
 
Week 8
A VD
 
Gain more freedom when migrating from Camunda 7 to 8.pdf
Phactum Softwareentwicklung GmbH
 
Windows Store app using XAML and C#: Enterprise Product Development
Mahmoud Hamed Mahmoud
 
An Introduction to Web Components
Red Pill Now
 
Going web native
Marcus Hellberg
 
Mobile optimization
purplecabbage
 
Hnd201 Building Ibm Lotus Domino Applications With Ajax Plugins
dominion
 
Rits Brown Bag - Salesforce Lightning
Right IT Services
 
Kogito: cloud native business automation
Mario Fusco
 
Being Epic: Best Practices for Android Development
Reto Meier
 
The fundamental problems of GUI applications and why people choose React
Oliver N
 
A gently introduction to AngularJS
Gregor Woiwode
 
Oracle MAF real life OOW.pptx
Luc Bors
 
Client Actions In Odoo 17 - Odoo 17 Slides
Celine George
 
Angular Js Basics
أحمد عبد الوهاب
 
5 x HTML5 worth using in APEX (5)
Christian Rokitta
 
Ad

Recently uploaded (20)

PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Ad

Practical Dynamic Actions - Intro