OK, you are using Interactive Grids, and have the basics down, so what’s next? This session goes beyond interactive grid essentials and covers the extras – charting, alternate views, editable grid alternate processing options, JavaScript customizations and high-level use of the grid APIs. We will examine features and attributes of APEX interactive grids that you might not (yet) be aware of.
2. TH TechnologyTH Technology
Master Interactive Grids
• Review the Essentials
• Learn Interactive Grid New and
Lesser-Known Features
Alt Edit Options ~ Alt Views ~ Charts ~ 18.1 New Features ~
Key APIs ~ Customizations
• Questions
12. TH TechnologyTH Technology
Interactive Grid
(Interactive Report or Tabular Form)
+ <All the Features You Ever Wanted>
(Thank You APEX Team!)
-----------------------------------------
Interactive Grid
15. TH TechnologyTH Technology
IGrid Architecture
Interactive Grid – Under the Hood
J Snyders
http://hardlikesoftware.com/weblog/201
6/06/08/interactive-grid-under-the-hood/
16. TH Technology
Interactive Report
• Generates HTML on
Server, part of Page
• Data Returned w UI
Markup
• One Big JS Module
Interactive Grid
• HTML Renders on
Client
• Data/Edits from
Server via JSON
• Collection of
Widgets
17. TH Technology
Interactive Report
• Collections
(pre 5.0)
• Browser Decides
Column Width
table-layout: auto;
Interactive Grid
• Model
• Each Column is an
“Item”
• Fixed Table
Layout
21. TH TechnologyTH Technology
What Is Editable
Columns
• Query Only
Rows
• Allowed Row Operations
• Set Column to Control Which Rows
Are Editable
• ‘U’ or ‘UD’ or NULL
37. TH TechnologyTH Technology
Table/View
• Can Be a DIFFERENT Table or
View w INSTEAD OF Triggers
• Ex: Display a View
• Save Using a Table
• Be Sure to Set Non-Updateable Cols
Query Only Yes
39. TH TechnologyTH Technology
Custom PL/SQL Process
• Beyond C U D
• PL/SQL Process –Copy Data to APEX
Collection
• Called For Each Submitted Row
• Cols are :BIND_VARIABLES
• Custom DML – Whatever Needed –
via the APEX Collection
42. TH TechnologyTH Technology
Upgrade Tabular Forms?
• Upgrade Utility
• May Need Rework
• Standard ➔ YES
• Non-Standard
• Maintain vs Rebuild
• Rebuild is Relatively Quick
• Rebuild is Cleaner
HOW
WHEN
55. TH TechnologyTH Technology
APEX JET Charts
• Subset of JET Charts
• SQL Query – Table – Web Service
• Declarative Attributes
• Adjust Attributes As Needed
56. TH TechnologyTH Technology
JET Charts in IR and IGrid
• Subset (IR/Grid JET Charts)
of the Subset (APEX JET Charts)
• Developer Must Supply Required Data
in Source
• Train End Users
• Ex: Grid Bubble,
• Ex: No Chart, JS Error
67. TH TechnologyTH Technology
APEX 18.2 JavaScript APIs
https://docs.oracle.com/database/apex-
18.2/AEXJS/index.html
Note: This doc does not yet have the new stuff:
https://docs.oracle.com/database/apex-
18.2/AEAPI/JavaScript-APIs.htm#AEAPI266
76. TH TechnologyTH Technology
Customizations
• Advanced → JavaScript Code
• Grid → Grid Menus
• Column → Column Menu
(Most of the Time…)
• Read Widget JS Files to Learn What is Possible
• Read Hardlikesoftware.com
No Longer PL/SQL Collections ~
Now JavaScript
80. TH TechnologyTH Technology
So What (Else) Can I Do ?
From the JavaScript console type:
apex.region(“igrid_id").widget().interactiveGrid("option","config")
96. TH TechnologyTH Technology
“Global” Settings
• JS Function in JS File
• Include File
• Reference JS Function in
Advanced → JavaScript Code
• Add Classes on Grids
118. TH TechnologyTH Technology
APEX$ROW_SELECTOR – PL/SQL
• Same as Tab Form:
BEGIN
IF :APEX$ROW_SELECTOR = ‘X’ THEN
-- your processing goes here
DELETE FROM EMP WHERE EMPNO = :ID;
END IF;
END;