SlideShare a Scribd company logo
APEX JAVASCRIPT API’s
2
My Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API's
APEX GURU
6
Why JavaScript?
We’ve got Dynamic Actions !
• Declarative
• Fire on Event
• Action (True / False)
7
But even in Dynamic Actions …
• Conditions
8
But even in Dynamic Actions …
• Conditions
• Elements
9
But even in Dynamic Actions …
• Conditions
• Elements
• Settings
10
But even in Dynamic Actions …
• Conditions
• Elements
• Settings
• Code
11
12
Copyright © 2016 APEX Consulting
$
13
$ ?
• $ = jQuery
• jQuery = apex.jQuery (2.1.3)
• You can install another version (e.g. 2.2.0) and use $
• Use jQuery selectors
14
Use jQuery selectors
• #ID
• .class
• element
• [attribute=value]
• :pseudo (:checked, :visible, etc.)
• Mix and match
15
Mix and match
• Click on a city and show
the name in a popup
16
17
tdtd.t-Report-celltd.t-Report-cell[headers=CUST_CITY]
alert($(this.triggeringElement).text());
My Top 5 APEX JavaScript API's
Copyright © 2016 APEX Consulting
$v, $v2, $s
19
$v
• Don’t use # for ID, just the ID itself - or a DOM node
$v(“#P4_FIELD”)
$v(“P4_FIELD”)
$(“P4_FIELD”).val()
$(“#P4_FIELD").val()
$v($(“input[name=p_t01]"))
$v($("input[name=p_t01]")[0])
20
$v2
• Same as $v for single value items
• Checkbox, Shuttle, Multi Select
• $v(“P4_CHECKBOX”)
• $v2(“P4_CHECKBOX”)
• Count selected items
21
$s
• Sets an item value
• $s(“P4_FIELD”,”ABCDE”)
• $s(“P4_CHECKBOX","10:30")
• $s(“P4_CHECKBOX”,[“20","40"])
• Click on report row to set ID
• For current record (http://roelhartman.blogspot.nl/2015/09/implementing-current-record-indicator.html)
• For master / detail sync
22
23
#dept tbody td.t-Report-cell
$s("P4_DEPTNO",
$(this.triggeringElement)
.siblings(“[headers=DEPTNO]")
.text()
);
24
25
Copyright © 2016 APEX Consulting
apex.jQuery.find (et.al)
Traversing
26
Traversing
• find() / children()
• closest() / parent() / parents()
• each()
27
find() / children()
• Looks “down” in the DOM
• One level vs. all levels
• Get me a list of all Salary data in the #emp report:
28
closest() / parent() / parents()
• Look “up” in the DOM
• One level / First found / All levels
• “Highlight Current Record”:
• After Refresh of :
$(".rowlink").closest("div.t-Region, div.t-IRR-region”)
• Set the class of the current TR
$(“.rowlink”).closest(“tr”).addClass(“clickable”);
29
each()
• Execute a function for each matched element
• Example : Highlight all high salaries
30
31
$("#emp")
.find("td[headers=SAL]")
.each( function(){
if (parseInt($(this).text()) > 2500 ){
$(this).addClass("highSal");
}
});
32
My Top 5 APEX JavaScript API's
Copyright © 2016 APEX Consulting
apex.event.trigger
34
apex.event.trigger
• Start a Dynamic Action using standard events
apex.event.trigger(“#emp”, “apexrefresh”)
apex.event.trigger(window, “apexwindowresized”)
• or … create your custom event
apex.event.trigger(“#emp”, “fireSalesmen”)
35
36
$("#emp")
.find("td[headers=JOB]")
.each( function(){
if ($(this).text() == "SALESMAN" ){
$(this).closest("tr").fadeOut(2000);
}
});
37
38
Copyright © 2016 APEX Consulting
apex.server.process
39
apex.server.process
• Fast
• Total control
• Solves “async issues”
40
41
apex.server.process
• Fast
• Total control
• Solves “async issues”
• http://api.jquery.com/jquery.ajax/
42
apex.server.process
• Fast
• Total control
• Solves “async issues”
• http://api.jquery.com/jquery.ajax/
43
44
apex.server.process(
'getEMP',
{ x01 : $(this.triggeringElement).data().action,
pageItems: "#P7_EMPNO"
},
{ success: function(data){
showEmp(data);
}
}
);
45
apex.server.process(
'getEMP',
{ x01 : (this.browserEvent.which==39)?"N":"P",
pageItems: "#P7_EMPNO"
},
{ success: function(data){
showEmp(data);
}
}
);
46
My Top 5
5. apex.jQuery / $
4. $v, $v2, $s
3. apex.jQuery.find et.al.
2. apex.event.trigger
1. apex.server.process
47
Q& A@roelh
roel@apexconsulting.nl
http://www.apexconsulting.nl
@roelh
roel@apexconsulting.nl
http://www.apexconsulting.nl
Copyright © 2016 APEX Consulting
49

More Related Content

PDF
[29DCF] PostgreSQL에서 DB Lock을 줄이는 5가지 팁
PPTX
Exploring the details of APEX sessions
PPTX
Sql queries presentation
PPTX
Js: master prototypes
PDF
jQuery Essentials
PDF
Peeking inside the engine of ZIO SQL.pdf
PPT
Hibernate
ODP
[29DCF] PostgreSQL에서 DB Lock을 줄이는 5가지 팁
Exploring the details of APEX sessions
Sql queries presentation
Js: master prototypes
jQuery Essentials
Peeking inside the engine of ZIO SQL.pdf
Hibernate

What's hot (20)

ODP
DOM HTML Javascript
PDF
React lecture
PDF
JavaScript - Chapter 7 - Advanced Functions
PDF
Java script aula 07 - eventos
PDF
Introduction to Bootstrap
PPTX
Local storage
PPTX
Oracle Database View
PDF
Oracle APEX Interactive Grid Essentials
PDF
Anonymous functions in JavaScript
PDF
Why The Free Monad isn't Free
PPTX
Oracle Index
PPTX
Spring beans
PPTX
Dapper - Rise of the MicroORM
PPT
PHP - Introduction to PHP Fundamentals
PPT
Introduction of ISPF
PDF
Callback Function
PPT
Tratamento de exceções java
PPTX
Taking your side effects aside
PPTX
Skillwise cics part 1
PPT
Java Collections Framework
DOM HTML Javascript
React lecture
JavaScript - Chapter 7 - Advanced Functions
Java script aula 07 - eventos
Introduction to Bootstrap
Local storage
Oracle Database View
Oracle APEX Interactive Grid Essentials
Anonymous functions in JavaScript
Why The Free Monad isn't Free
Oracle Index
Spring beans
Dapper - Rise of the MicroORM
PHP - Introduction to PHP Fundamentals
Introduction of ISPF
Callback Function
Tratamento de exceções java
Taking your side effects aside
Skillwise cics part 1
Java Collections Framework
Ad

Viewers also liked (20)

PDF
Mastering universal theme
PPTX
Integration of APEX and Oracle Forms
PDF
Automated testing APEX Applications
PPTX
Oracle APEX or ADF? From Requirements to Tool Choice
PDF
Striving for Perfection: The Ultimate APEX Application Architecture
PPTX
Oracle Forms to APEX conversion tool
PDF
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
PPTX
Oracle APEX Performance
PDF
Leveraging JavaScript Promises and the Bulk API
PPT
Oracle APEX plugins - AUSOUG Connect 2016
PDF
Take a load off! Load testing your Oracle APEX or JDeveloper web applications
PDF
APEX Developers : Do More With LESS !
PPTX
APEX Dashboard Competition - Winners
PDF
Troubleshooting APEX Performance Issues
PDF
Oracle Text in APEX
PPT
APEX 5.1 features - AUSOUG Connect 2016
PDF
Packaged Applications in APEX 5.0
PDF
Ten Tiny Things To Try Today - Hidden APEX5 Gems Revealed
PPT
WebXpress 3PL Management
PPT
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Mastering universal theme
Integration of APEX and Oracle Forms
Automated testing APEX Applications
Oracle APEX or ADF? From Requirements to Tool Choice
Striving for Perfection: The Ultimate APEX Application Architecture
Oracle Forms to APEX conversion tool
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
Oracle APEX Performance
Leveraging JavaScript Promises and the Bulk API
Oracle APEX plugins - AUSOUG Connect 2016
Take a load off! Load testing your Oracle APEX or JDeveloper web applications
APEX Developers : Do More With LESS !
APEX Dashboard Competition - Winners
Troubleshooting APEX Performance Issues
Oracle Text in APEX
APEX 5.1 features - AUSOUG Connect 2016
Packaged Applications in APEX 5.0
Ten Tiny Things To Try Today - Hidden APEX5 Gems Revealed
WebXpress 3PL Management
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Ad

Similar to My Top 5 APEX JavaScript API's (20)

PDF
Utilising the data attribute
PDF
Introduction to JavaScript for APEX Developers - Module 2: Adding JavaScript ...
PPTX
Dynamic Actions, the Hard Parts
PDF
Module 2: Adding JavaScript to APEX Apps
PDF
Practical Dynamic Actions - Intro
PDF
Apex day 1.0 pretius real life apex_przemyslaw staniszewski
PPTX
Preethi apex-basics-jan19
PPTX
JavaScript: Why Should I Care?
PPTX
APEX Office Hours Interactive Grid Deep Dive
PDF
Advanced Visualforce Webinar
PPTX
Large Data Volume Salesforce experiences
PDF
Intro to JavaScript for APEX Developers
PPTX
Oracle application express ppt
PPTX
Oracle application express
PPT
Df12 Performance Tuning
PPTX
Oracle apex training
PPTX
SFDC Other Platform Features
PDF
Follow the evidence: Troubleshooting Performance Issues
PDF
Performance Tuning for Visualforce and Apex
PPTX
ELEVATE Paris
Utilising the data attribute
Introduction to JavaScript for APEX Developers - Module 2: Adding JavaScript ...
Dynamic Actions, the Hard Parts
Module 2: Adding JavaScript to APEX Apps
Practical Dynamic Actions - Intro
Apex day 1.0 pretius real life apex_przemyslaw staniszewski
Preethi apex-basics-jan19
JavaScript: Why Should I Care?
APEX Office Hours Interactive Grid Deep Dive
Advanced Visualforce Webinar
Large Data Volume Salesforce experiences
Intro to JavaScript for APEX Developers
Oracle application express ppt
Oracle application express
Df12 Performance Tuning
Oracle apex training
SFDC Other Platform Features
Follow the evidence: Troubleshooting Performance Issues
Performance Tuning for Visualforce and Apex
ELEVATE Paris

More from Roel Hartman (12)

PDF
Wizard of ORDS
PDF
APEX Bad Practices
PDF
Tweaking the interactive grid
PDF
Docker for Dummies
PDF
A deep dive into APEX JET charts
PDF
Best of both worlds: Create hybrid mobile applications with Oracle Applicatio...
PDF
APEX printing with BI Publisher
PDF
5 Cool Things you can do with HTML5 and APEX
PDF
XFILES, the APEX 4 version - The truth is in there
PDF
Done in 60 seconds - Creating Web 2.0 applications made easy
PPTX
Tales from a Parallel Universe: Using Oracle 11gR2's Edition Based Redefiniti...
PPTX
Creating sub zero dashboard plugin for apex with google
Wizard of ORDS
APEX Bad Practices
Tweaking the interactive grid
Docker for Dummies
A deep dive into APEX JET charts
Best of both worlds: Create hybrid mobile applications with Oracle Applicatio...
APEX printing with BI Publisher
5 Cool Things you can do with HTML5 and APEX
XFILES, the APEX 4 version - The truth is in there
Done in 60 seconds - Creating Web 2.0 applications made easy
Tales from a Parallel Universe: Using Oracle 11gR2's Edition Based Redefiniti...
Creating sub zero dashboard plugin for apex with google

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
A Presentation on Artificial Intelligence
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Approach and Philosophy of On baking technology
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Big Data Technologies - Introduction.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
A Presentation on Artificial Intelligence
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Approach and Philosophy of On baking technology
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Review of recent advances in non-invasive hemoglobin estimation
Building Integrated photovoltaic BIPV_UPV.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Big Data Technologies - Introduction.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Encapsulation_ Review paper, used for researhc scholars
Diabetes mellitus diagnosis method based random forest with bat algorithm
Per capita expenditure prediction using model stacking based on satellite ima...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
cuic standard and advanced reporting.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf

My Top 5 APEX JavaScript API's