We all make mistakes. Making mistakes is an opportunity to learn. But as a first step you have to recognize the mistakes you made.
If you don't, those mistakes might evolve into a practice. A bad practice.
But you can also learn from someone else's mistakes.
That's why I crowdsourced "Bad Practices" that people have encountered in the wild.
And I was suprised by the numerous examples people came up with.
So this session will cover real world examples of practices that are labeled as "bad".
Of course we will discuss why these practices are bad and what would be the better solution.
62. Page “JavaScript section”
Page header / footer
Region header / footer
Item Pre / Post Text
URL target
Dynamic Action When / Condition
DA Action : Execute JavaScript Code
Where CAN you put your JavaScript?
63. Where SHOULD you put your JavaScript?
In a file (on your network / static app file)
(reference in the User Interface Details)
In a Plugin (JavaScript file)
Roels Rule : No JavaScript anywhere else
64. The code is more what you'd call "guidelines" than actual rules
65. How should you code your JavaScript?
$(“#P1_EMPNO”)
or
apex.item(“P1_EMPNO”)
66.
67.
68. How should you code your JavaScript?
$v(“#P1_EMPNO”)
or
apex.item(“P1_EMPNO”).getValue()
69. How should you code your JavaScript?
$v(“P1_EMPNO”)
or
apex.item(“P1_EMPNO”).getValue()
70.
71.
72. Know your APEX JavaScript API’s
https://docs.oracle.com/en/database/oracle/application-express/19.1/aexjs/index.html