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

PPTX
SharePoint Mobile Extensions - improving efficiency of mobile workforce
PDF
Trailblazer Introduction by Nick Sutterer
PPTX
The 4 Layers of Single Page Applications You Need to Know
PDF
"Ruby meets Event Sourcing" by Anton Paisov
PDF
Production Ready Web Services with Dropwizard
PDF
JOSA TechTalks - Better Web Apps with React and Redux
PPTX
MVC3 Development with visual studio 2010
PPTX
Mobile for SharePoint with Windows Phone
SharePoint Mobile Extensions - improving efficiency of mobile workforce
Trailblazer Introduction by Nick Sutterer
The 4 Layers of Single Page Applications You Need to Know
"Ruby meets Event Sourcing" by Anton Paisov
Production Ready Web Services with Dropwizard
JOSA TechTalks - Better Web Apps with React and Redux
MVC3 Development with visual studio 2010
Mobile for SharePoint with Windows Phone

What's hot (20)

PDF
RESTful services and OAUTH protocol in IoT
PPTX
Introduction to AngularJS Framework
PPTX
Building user interface with react
PDF
Integrating consumers IoT devices into Business Workflow
PDF
An introduction to AngularJS
PPTX
React JS: A Secret Preview
PPTX
Introduction to Android Programming
PDF
A comprehensive guide on developing responsive and common react filter component
PPTX
Point and Click App Building Workshop
ODP
code-camp-meteor
PPT
ASP.NET AJAX with Visual Studio 2008
PDF
Salesforce Lightning Components Workshop
DOCX
Creation of simple application using - step by step
PPTX
Angular js 1.3 presentation for fed nov 2014
PDF
Google Cloud Messaging
PPT
Introduction to Vaadin
PPT
ASP.NET AJAX Basics
PPTX
Angular2 and TypeScript
PDF
Lean Quality & Engineering
PDF
Introduction to React for Frontend Developers
RESTful services and OAUTH protocol in IoT
Introduction to AngularJS Framework
Building user interface with react
Integrating consumers IoT devices into Business Workflow
An introduction to AngularJS
React JS: A Secret Preview
Introduction to Android Programming
A comprehensive guide on developing responsive and common react filter component
Point and Click App Building Workshop
code-camp-meteor
ASP.NET AJAX with Visual Studio 2008
Salesforce Lightning Components Workshop
Creation of simple application using - step by step
Angular js 1.3 presentation for fed nov 2014
Google Cloud Messaging
Introduction to Vaadin
ASP.NET AJAX Basics
Angular2 and TypeScript
Lean Quality & Engineering
Introduction to React for Frontend Developers
Ad

Similar to Practical Dynamic Actions - Intro (20)

PPT
Silverlight 2 for Developers - TechEd New Zealand 2008
PPT
JavaScript and DOM Pattern Implementation
PPTX
Take Your XPages Development to the Next Level
PDF
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
PPT
Week 8
PDF
Gain more freedom when migrating from Camunda 7 to 8.pdf
PPTX
Windows Store app using XAML and C#: Enterprise Product Development
PPTX
An Introduction to Web Components
PDF
Going web native
KEY
Mobile optimization
PPT
Hnd201 Building Ibm Lotus Domino Applications With Ajax Plugins
PPTX
Rits Brown Bag - Salesforce Lightning
PDF
Kogito: cloud native business automation
PDF
Being Epic: Best Practices for Android Development
PDF
The fundamental problems of GUI applications and why people choose React
PDF
A gently introduction to AngularJS
PDF
Oracle MAF real life OOW.pptx
PPTX
Client Actions In Odoo 17 - Odoo 17 Slides
PPTX
Angular Js Basics
PPTX
5 x HTML5 worth using in APEX (5)
Silverlight 2 for Developers - TechEd New Zealand 2008
JavaScript and DOM Pattern Implementation
Take Your XPages Development to the Next Level
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
Week 8
Gain more freedom when migrating from Camunda 7 to 8.pdf
Windows Store app using XAML and C#: Enterprise Product Development
An Introduction to Web Components
Going web native
Mobile optimization
Hnd201 Building Ibm Lotus Domino Applications With Ajax Plugins
Rits Brown Bag - Salesforce Lightning
Kogito: cloud native business automation
Being Epic: Best Practices for Android Development
The fundamental problems of GUI applications and why people choose React
A gently introduction to AngularJS
Oracle MAF real life OOW.pptx
Client Actions In Odoo 17 - Odoo 17 Slides
Angular Js Basics
5 x HTML5 worth using in APEX (5)
Ad

Recently uploaded (20)

PPT
JAVA ppt tutorial basics to learn java programming
PPT
Introduction Database Management System for Course Database
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
medical staffing services at VALiNTRY
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
L1 - Introduction to python Backend.pptx
PDF
top salesforce developer skills in 2025.pdf
DOCX
The Five Best AI Cover Tools in 2025.docx
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Materi_Pemrograman_Komputer-Looping.pptx
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
System and Network Administraation Chapter 3
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Introduction to Artificial Intelligence
JAVA ppt tutorial basics to learn java programming
Introduction Database Management System for Course Database
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
medical staffing services at VALiNTRY
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
L1 - Introduction to python Backend.pptx
top salesforce developer skills in 2025.pdf
The Five Best AI Cover Tools in 2025.docx
Operating system designcfffgfgggggggvggggggggg
Materi-Enum-and-Record-Data-Type (1).pptx
Softaken Excel to vCard Converter Software.pdf
Understanding Forklifts - TECH EHS Solution
2025 Textile ERP Trends: SAP, Odoo & Oracle
Materi_Pemrograman_Komputer-Looping.pptx
ManageIQ - Sprint 268 Review - Slide Deck
How to Choose the Right IT Partner for Your Business in Malaysia
System and Network Administraation Chapter 3
Odoo POS Development Services by CandidRoot Solutions
Introduction to Artificial Intelligence

Practical Dynamic Actions - Intro