Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Apex 5.1 migration and templates - APAC webinar tour
1. Lino Schildenfeld 21 July 2017
Oracle APEX
Our experience – Upgrading to 5.1.1
www.apexRnD.co.nz
lschilde.blogspot.com
@LinoSchilde
lschilde@apexRnD.co.nz
APACOUC Webinar Tour
2. ...in short
APEX R&D manager for NZ and AU
10+ years Oracle development experience
APEX Blogger and enthusiast
NZ APEX meetup organizer
Conference speaker
AUSOUG APEX webinar series organizer
Who am I?
5. What we know
Themes and templates are responsible for the look and feel
of APEX applications.
Nine different types
Bradcrumb, Button, Calendar, Label, List, Page, Popup LOV,
Region, Report
APEX 5 – significant reduction in number of templates
BlueJay 22 had 99 -> Universal theme 56
Biggest change was table to grids/div as main HTML
elements.
14. Error 1 – Page Item
"error":"Ajax call returned server error ORA-20987: APEX - Session state protection
violation: This may be caused by manual alteration of a URL containing a checksum
or by using a link with an incorrect or missing checksum. If you are unsure what
caused this error, please contact the application administrator for assistance. - Contact
your application administrator. for ."
15. Error 1
"error":"Ajax call returned server error ORA-20987: APEX - Session state protection
violation: This may be caused by manual alteration of a URL containing a checksum
or by using a link with an incorrect or missing checksum. If you are unsure what
caused this error, please contact the application administrator for assistance. - Contact
your application administrator. for ."
16. Error 2 – Interactive report
Chrome console throws this error when you select Action- > Filter
17. Error 2 - IR
http://lschilde.blogspot.com.au/2017/04/apex-51-migration-compatibility-tips.html
4. problem
Bad programming practice example.
18. Error 3 – Application page
Uncaught TypeError: Cannot read property 'pageItems' of undefined
at i (desktop.min.js:10)
at h (desktop.min.js:10)
at Object.a.process (desktop.min.js:10)
at Object.handleJson [as success] (map_rbgassessment.js:232)
at i (jquery-2.2.3.min.js:2)
at Object.fireWith [as resolveWith] (jquery-2.2.3.min.js:2)
at z (jquery-2.2.3.min.js:4)
at HTMLScriptElement.c (jquery-2.2.3.min.js:4)
at HTMLScriptElement.dispatch (jquery-2.2.3.min.js:3)
at HTMLScriptElement.r.handle (jquery-2.2.3.min.js:3)
19. Error 3 – Application page
Simple page with this AJAX call
apex.server.process ("deletePins");
deletepins process-> simple as
delete RATE_COLLECTION. TMP_PIN_NUMBERS;
21. Error 4 – Report region
ISSUE: Download is showing additional column with url
Report on a page had SQL query for the source
SELECT '<a href="javascript:apex.confirm(''Do you want to
return this organism as a member?'', ''REVIVE_' || CARRIER_ID
|| ''');"><img src="#WORKSPACE_IMAGES#red-delete.svg"
alt="revive" title="Revive Member"></a>'
SHOW demo....
22. Error 4 – Report region
SOLUTION
Export / Printing
Include In Export / Print
Yes No -> set to NO defaulted to YES
23. Error 5 – Home breadcrumb link
Apex 4.x compatibility apps have an issue with the home breadcrumb not
substituting values
Rendered URL looks like this:
http://agfjsrmw605.agric.wa.gov.au:9004/apex/eds/f?
p=&APP_ID.:HOME:&SESSION.
24. Error 5 – Home breadcrumb link
http://lschilde.blogspot.com.au/2017/04/apex-51-migration-compatibility-tips.html
2. problem
25. Other
ERROR 6:
Dialogs for applications running in compatibility:
Front dialog not at correct z-index – unable to click due to modal click blocker
being in front. (Selenium tests still work)
Workaround – add style
body .ui-dialog.ui-front{z-index:1001 !important}
ERROR 7: Change in Y/N behaviour:
The Yes/No field type has changed to Switch – but does not allow null values.
Workaround – change to LOV dropdown with Y/N and allow null value.
27. 1 apex.server.process
ERROR 1:
Simple page when rendered would give this error
Uncaught TypeError: Cannot read property 'pageItems' of null
at i (mobile.min.js?v=5.1.1.00.08:10)
at h (mobile.min.js?v=5.1.1.00.08:10)
at Object.a.process (mobile.min.js?v=5.1.1.00.08:10)
at toggleFavourite (f?
p=106:5:21554343857848::NO:RP,10:P5_STATION_CODE,P5_STATION_NAME,P5_S
OURCE_PAGE:BA, Badgingarra,1:200)
at <anonymous>:1:1
28. 1 apex.server.process
The core of the problem was this JavaScript
<script>
function toggleFavourite() {
apex.server.process (
"togglefavourite",
null,
{
dataType: 'text',
success: function(isFavourite) {
if(isFavourite=='Y') $
('#favouritebutton').addClass('favourite');
else $('#favouritebutton').removeClass('favourite');
}
} );
}
</script>
NULL was an issue
29. 2 invalid JSON
togglefavourite PROCESS:
begin
htp.prn('Y');
end;
Now this became an invalid JSON as characters need a quotes htp.prn('"Y"');
30. 3 Map error
Uncaught ReferenceError: google is not defined
at HTMLDivElement.eval (eval at globalEval (jquery-
2.2.3.min.js?v=5.1.1.00.08:2), <anonymous>:39:20)
at HTMLDivElement.e (jquery-2.2.3.min.js?v=5.1.1.00.08:3)
at HTMLDivElement.dispatch (jquery-2.2.3.min.js?
v=5.1.1.00.08:3)
at HTMLDivElement.r.handle (jquery-2.2.3.min.js?
v=5.1.1.00.08:3)
Page 15
31. 3 Map error
By changing reference to a a Google JS library from inline on
page to page template
https://maps.googleapis.com/maps/api/js?
key=&GOOGLE_API_KEY.&v=3.26&libraries=weather
32. 4 Menu error
bigSlide menu JS
Menu did not work after Save or any navigation happened in the
application was clicked.
Lets have a look at Page with right panel template
33. 4 Menu error
problem was in new way APEX template work (since 4.2 version)
If you are on page ID 1 and navigate to page ID 5 menu stops working because your
page DOM holds more elements with same ID.
Why? inspect your DOM when you navigate from page to page
<div id="P1" data-role="page" data-apex-page-transition="none"
data-apex-popup-transition="none" data-theme="c" data-url
<div id="P5" data-role="page" data-apex-page-transition="none"
data-apex-popup-transition="none" data-theme="c" data-url.....
.....
We had a button on page 0 called Menu with static ID = rightpanel-link. JavaScript
was triggering on ID click which was now broken as multiple existed on same page.
work around apply logic but with the use of a classes.....
insted of $('#rightpanel-link').bigSlide(
$('.rightpanel-link').bigSlide(.....
34. 4b Menu error
Another menu issue showing blank. Region had a condition not to render on page
101.
Due to 101 condition?????? For some reason content was not loaded in.
35. APEX 5.1.1 Mobile link bug
Demo - APEX mobile bug
I tested this on apex.oracle.com and on new application using 5.1
APEX 5.0 - fine
APEX 5.1.1 - broken
36. Interactive Grid?!!!!
It is the next big thing
Master detail capability
Is it capable replacing IR as it is now?
Simple processing
Buggy behavior (not ready yet for full replacement)
The story is we are manager or rookie developers looking for information. Wanting to join and work with APEX.
Theme Roller does not give access to change all features and areas, some changes make; Template Options are not customizable without breaking the subscription;
Simple architecture where page requests and submissions made from the browser are tunnelled through the mid-tier to execute in the Oracle Database and returned as HTML responses to the browser.
No data manipulation or processing is performed in the mid-tier, instead the APEX engine (inside the Oracle DB) accepts the page, and interacts with the data schemas in the DB.
The mid-tier can be either the preferred Oracle REST Data Services (ORDS) running in a Java Server {either Oracle Web-Logic Server (WLS), Oracle Glassfish, or Tomcat} or Oracle Embedded PL/SQL Gateway (EPG) which is part of the Oracle DB, or Oracle HTTP Server (OHS) with mod_plsql.
It is common for OHS to be installed in front of ORDS to act as a proxy and serve images.
The story is we are manager or rookie developers looking for information. Wanting to join and work with APEX.
The story is we are manager or rookie developers looking for information. Wanting to join and work with APEX.
If you dig into debug mode you would get some more details where APEX was listing what page item this problem occurred for. Bottom of the problem was some page items had Security attribute Session State Protection set to Check sum required - Session Level and were used in AJAX calls which now cause security errors to be shown. Solution of the problem was to change this as:
ISSUE: Session State Protection needed to be updated from Checksum required to Unrestricted.
If you dig into debug mode you would get some more details where APEX was listing what page item this problem occurred for. Bottom of the problem was some page items had Security attribute Session State Protection set to Check sum required - Session Level and were used in AJAX calls which now cause security errors to be shown. Solution of the problem was to change this as:
ISSUE: Session State Protection needed to be updated from Checksum required to Unrestricted.
Interactive report Filter Issue for 4.x compatibility mode When you select Action-&gt; Filter, Chrome console throws this error and it does not display filter options dialog screen:
It came down to bad programming practice and simple region Static ID set by developers
Solution: After significant amount of hours investigating, what narrowed it down was a desperate page export and comparison between working and non working IR page. Core cause of all problems had nothing to do with Classic Date Picker nor with any JQuery conflict. It came down to bad programming practice and simple region Static ID set by developers. Pages where Filter action had an issue had ID set something similar to:
The story is we are manager or rookie developers looking for information. Wanting to join and work with APEX.
........
when SAVE or Back button buton clicked menu would stop working....
Problem was again in new way how APEX treated tempaltes..... if you would navigate over MAP page it would not work if you would navigate directly page would work.
By changing reference to a a Google JS library from inline on page to page template
https://maps.googleapis.com/maps/api/js?key=&GOOGLE_API_KEY.&v=3.26&libraries=weather
Show page 15....
........
when SAVE or Back button buton clicked menu would stop working....
Problem was again in new way how APEX treated tempaltes..... if you would navigate over MAP page it would not work if you would navigate directly page would work.
By changing reference to a a Google JS library from inline on page to page template
https://maps.googleapis.com/maps/api/js?key=&GOOGLE_API_KEY.&v=3.26&libraries=weather
Show page 15....