Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Mastering Dynamic Actions

in Oracle Application Express #orclapex
by

Scott Wesley

on 24 November 2016

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Mastering Dynamic Actions

Community
Scott Wesley
Mastering Dynamic Actions
in Oracle APEX
Early enough to
Dynamic Actions
Page Designer
warped my use of
for the better
@swesley_perth
By User:Mrs skippy - Own work, Public Domain,
https://commons.wikimedia.org/w/index.php?curid=3352618
www.dailydot.com/debug/harvard-3d-printed-autonomous-octopus/
Landsat 2000 - Lena Delta, Russia
Exhibit A
Exhibit B
Exhibit C
Toggle Buttons
Row button click
Communication
<click delete>
check child count
return 0
Message: "All clear, are you sure?"
...thinking...
<OK>
"error: child record exists"
<click delete>
attempt delete
success
Offer undo
failure
"sorry"
console.log(
'Click change emp'
);
apex.server.process
( "CB_AJAX"
,{x01 : $v('P42_ITEM')}
}
)
.done
(function(pData){

console.log(
'Success:
'
+pData);

$s('P9_SAL', pData[0].SAL);
});
console.log(
'2nd action'
);
Today's theme:
patterns
My Runtime World View
My IDE
Thank you, Oracle APEX team,
for making a
browser
my IDE.

APEX 5.1 IG will shake these up a little
APEX
Text
SQL
Exhibit A
Exhibit B
Exhibit C
Toggle Buttons
Row Buttons
Communication
Page Items
to
Return
column = :P1_ITEM
Page Items
to
Submit
$v('P1_RETURN')
infinite loop
many ways to solve the problem
many ways to solve the problem
ring
"affordance"
https://www.smashingmagazine.com/2014/06/affordance-most-underrated-word-in-web-design
99% code free*
springer.com/us/book/9781484209615
integrate APEX 5.0
APEX 5.1
xplug
Render
Dynamic Actions
Processes
Branches
Set Item on Click
trigger work based on value
Level: Easy
Click Event on jQuery Selector
traversing the DOM
Flexibility
Invoke Specific Dynamic Action
set
and
forget
Lose reference to
triggering component
console.log(
'job td:'
+$(this.triggeringElement)



);

console.log(
'click row button'
);
console.log(
this.triggeringElement
);
console.log
('job attr:
'
+$(this.triggeringElement
).data
('job
'
));
console.log('emp:'+
this.browserEvent.empno
);
$.event.trigger('myDA', '#EMPNO#');
this.data
www.eberapp.com/pls/apex/f?p=BLOG:READ:0::::ARTICLE:1763700346995827
www.eberapp.com/pls/apex/f?p=BLOG:READ:0::::ARTICLE:2116700346816536
Jeff Eberhard
#letswreckthistogether
Submit Page
Update DB
Toggle Button
Case: Add / Remove Favourite
Help
Check
Exists
Declarative
Condition
Add
Toggle
Remove
Toggle
= no page jumping
= more productivity
+ Properties
Page Designer
Component View
Y
N
Multiple buttons

Set value of item

OnChange DA(s) fire

(re) actions executed
1) Add row to collection
2) Refresh region
console.log('Click change emp');
very important
the database
needs to be aware of
says what browser field changes
and what gets updated from db
What info can I get about what was clicked?
What can I do with it?
$.event.trigger('myDA', '#EMPNO#');
Debug
console.log(this);
console.log(this
.browserEvent.meth
);
JavaScript Action:
$s('P1_EMPNO', );
OnChange
PL/SQL Stuff
Feedback
- Asynchronous
#db12c
t
small
wait
user b adds record
continue doing stuff
asyncronous
or, wait for result
close dialog
.
var ajaxRequest = new

htmldb_Get
(null
,$v('pFlowId')
,'APPLICATION_PROCESS=CB_AJAX'
,$v('pFlowStepId')
);
apex.server.process
("CB_AJAX"
,{x01 : $v('P42_ITEM')}
,{
async: false
// deprecated synchronous option
,success: function(pData) {

// deprecated wait for result

}
).done(function(pData) {
// 5.1 wait for result

// ...
});
:P1_RETURN := 42;
:APP_AJAX_X01
#1
#2
#3
www.grassroots-oracle.com/2015/12/calling-plsql-from-javascript-in-apex.html
circa 3.x
circa 4.x
5.1
< 5.1
Wait for Result
= True
KISS
Minimise Page Submits
!apex.item('P20_EVENT_ID').isEmpty()
Does event still apply after region refresh?
Dynamic (Live)
Lacks
chronology
/
Context
&&
Behaviour
User Validation
(fn_wait_for_plsql() == 0)
-- 1%
Client Validation
Always apply server validation
Classic report - alert template
position:
absolute
undo_emp(#EMPNO#);
:P3_SUCCESS
The first draft of Chapter 9 made it into initial release.
Before I understood this arrow
Offer Undo
www.goodui.org/#8
#orclapex
community.oracle.com
orclapex.slack.com
apex.world
www.odtug.com/apex
.closest('tr')
.
find('[headers=JOB]')
.text()
this.triggeringElement
pretty much anything
common trap
No page submit
Toggle Buttons
Row Button Click
Communication
More interactive application
Remember, you're on the web
Name the three simple shapes in my session?
Mastering Dynamic Actions
in Oracle APEX
by Scott Wesley
grassroots-oracle.com
pattern
patterns
pattern
pattern
Formal
Informal
Collaborative
Global
subjective
apply
server level
validation
#ThanksOTN
What is a
Client Side Behaviour
Dynamic Action?
No JavaScript
patterns
siliconangle.com/files/2015/12/exmachina-1080x675.png
or it took writing a book to
understand how to simplify behaviours
Dynamic Action
* n
[ A, B, C]
Inspect Element
Single Parameter
Debug log
'synchronous'
a
synchronous
AJAX
Switches
Full transcript