FAPEX is a collection of essential tools and resources for Oracle APEX developers. It makes it easier to do complex tasks without having to write or copy code on every page.
Feel free to use FAPEX in your own projects. If you find any bugs or need assistance, please contact me. I am also open to suggestions for new features.
Here is the list of files and their purposes:
Name | Description |
---|---|
fapex.js | This file is contains the JS code for all the FAPEX modules. |
fapex.css | This file contains the CSS rules related to FAPEX. |
pkg_fapex.sql | This file contains the backend package to be deployed in database. |
1. FAPEX Reports
2. Fapex Navigation
3. Fapex Featuress
- Oracle APEX 23.1
First, download the following file(s):
- Download this file from gitHub.
- Upload in Static Application Files
Application > Shared Components > Static Application Files
of your Application. - Copy the Reference/Path
- Add the Reference/Path in
Application > Shared Components > User Interfaces > JavaScript > File URLs
- Download this file from gitHub.
- Upload in Static Application Files
Application > Shared Components > Static Application Files
of your Application. - Copy the Reference/Path
- Add the Reference/Path in
Application > Shared Components > User Interfaces > CSS > File URLs
- Download this file from gitHub.
- Go to SQL Scripts section under SQL Workshop
- Click upload button and upload the pkg_fapex.sql.
- Click run button.
- Go to
Application > Shared Components > Application Processes
- Click
Create
and setName = FAPAXPROCESS
andPoint = Ajax Callback
- Click Next
- Enter
PKG_FAPEX.execute_fapex_procedures;
in Code section - Click Next and then
Create Process
Contributors
Farhan Akram
To make your Classic Reports and Interactive Reports more interactive and useful. You can create master detail pages and do lot of selection based tasks.
- Single and Multiple row selection
- Enables to add Selection change Dynamic Action
- Get data for selected/All rows
- Get data for most recently selected row
- Add class to selected row
- Works only for Classic and Interactive Reports
- In case of pagination, FAPEX will work only for current Page
Argument Name | Type | Required | Description |
---|---|---|---|
list |
Array/Object | Yes | Single/Array of objects {staticId : <region static id>, options : <object with following properties>} |
Argument Name | Type | Required | Description |
---|---|---|---|
regionId |
String | Yes | Static ID of the region. |
options |
Object | No | Refer to following table for options object. |
Name | Default | Required | Purpose |
---|---|---|---|
multiSelection |
False |
No | If the user is allowed to select multiple rows. |
selectFirstRow |
True |
No | If first row is selected by default. (If multiSelection is off) |
selectionClass |
undefined |
No | Name of the class to be added if the row is selected. |
Method Name | Purpose |
---|---|
getSelectedRows |
To get array of Selected Rows Objects. |
getAllRows |
To get array of All the Rows Objects. |
getSelectedRowsData |
To get array of Selected Rows Arrays. |
getAllRowsData |
To get array of All the Rows Arrays. |
getColumnList |
To get array of available columns' |
selectAll |
Select all rows |
clearSelection |
Clear the selection |
First of all, intstall FAPEX
Initialize FAPEX report module by adding following code in Page Properties > Function and Global Variable Declaration
One FAPEX Report on a Page
let options = {
multiSelection: true,
selectFirstRow: false,
selectionClass: 'MyClass'
};
fx = new InitializeFapexReport({ staticId: 'projects_report', options: options });
or you can simply add following to user default options
fx = new InitializeFapexReport({ staticId: 'projects_report'});
Multiple FAPEX Reports on a Page
let options = {
multiSelection: true,
selectFirstRow: false,
selectionClass: 'MyClass'
};
fx = new InitializeFapexReport([{ staticId: 'projects_report', options: options },
{ staticId: 'project_details', options: options },
{ staticId: 'project_timelines', options: options }]);
Add Dynamic Action 'Selection Change [Interactive Grid]' to Report region. Recently selected row data can be retrieved through this.data
in JS code. For example to print the row data on console you can write following code in JS.
console.log(this.data);
Passing parameters and navigating to a page throught JavaScript has become very easy.
- Generate Parameter list at runtime
- Decide calling page at runtime
- Navigate to any page at runtime through JavaScript
- Open Page in separte tab.
- Works only to Navigate/Open apex pages.
Output: #app_id@page_no
Argument Name | Type | Required | Description |
---|---|---|---|
app_id |
String | Yes | Application ID of the page |
page_no |
String | Yes | Page No of the page |
Output: Returns Application ID extracted from input.
Argument Name | Type | Required | Description |
---|---|---|---|
PageId |
String | Yes | Page ID in the format #app_id@page_no |
Output: Returns Page No extracted from input.
Argument Name | Type | Required | Description |
---|---|---|---|
PageId |
String | Yes | Page ID in the format #app_id@page_no |
Output: Returns URL for given page and parameters.
Argument Name | Type | Required | Description |
---|---|---|---|
PageId |
String | Yes | Page ID in the format #app_id@page_no |
paramObj |
Object | No | Object containing parameters. Key: <Parameter Name>, Value: <Parameter Value> i.e. {P20_EMPLOYEE_ID:'5425', P20_AGE:'25'} |
Navigate to the given page.
Argument Name | Type | Required | Description |
---|---|---|---|
PageId |
String | Yes | Page ID in the format #app_id@page_no |
paramObj |
Object | No | Object containing parameters. Key: <Parameter Name>, Value: <Parameter Value> i.e. {P20_EMPLOYEE_ID:'5425', P20_AGE:'25'} |
Open page in separate tab.
Argument Name | Type | Required | Description |
---|---|---|---|
PageId |
String | Yes | Page ID in the format #app_id@page_no |
paramObj |
Object | No | Object containing parameters. Key: <Parameter Name>, Value: <Parameter Value> i.e. {P20_EMPLOYEE_ID:'5425', P20_AGE:'25'} |
First of all, install FAPEX
Navigate to Page
let fxn = new FapexNavigation();
let paramObj = { P3_EMPLOYEE_NO: '123', P3_AGE: 25 }
fxn.navToPage('#285692@3', paramObj);
or you can use following snippet if the page has no parameters.
let fxn = new FapexNavigation();
fxn.navToPage('#285692@3', {});
Open Page in separate tab
let fxn = new FapexNavigation();
let paramObj = { P3_EMPLOYEE_NO: '123', P3_AGE: 25 }
fxn.openPage('#285692@3', paramObj);
or you can use following snippet if the page has no parameters.
let fxn = new FapexNavigation();
fxn.openPage('#285692@3', {});
This module contains different options to provide you exiting features without writing extra lines of code.
If you try to copy a single Cell in Interactive Grid by pressing Ctrl+C, it will copy the whole row. If you want to copy only a focussed cell, add folloing code sippet on page load.
let fxf = new FapexFeatures();
fxf.copyIGCell();
- Works only for Interactive Grids
Farhan Akram
Sr. Oracle Apex Developer
mrfarhanakram@outlook.com
Linkedln