Pretius APEX Context Menu is dynamic action plugin implementing APEX popup menu based on defined APEX list. The plugin can be attached to any HTML element and renders entries according to authorisation scheme result. Menu entries can be extended by overriding behaviour, dynamically adding submenu and by adding new entries.
- License
- Demo application
- Features at Glance
- Roadmap
- Install
- APEX list integration
- Usage Guide
- Plugin Settings
- Changelog
- Known issues
- Related articles
- About Author
- About Pretius
- Free support
- Become a contributor
- Comercial support
MIT
https://apex.oracle.com/pls/apex/f?p=PRETIUS_APEX_CONTEXT_MENU:1
- compatible with Oracle APEX 5.1, 18.x, 19.x
- basic usage doesn't require JavaScript knowledge
- uses native APEX menu widget
- based on APEX list
- supports authorization schemes
- supports basic conditions
- list entries can be extended on runtime
- to override action on click
- to disable entry
- to hide entry
- to add submenu defined outside APEX list
- can be bind with any DOM element
- not yet available
PRETIUS_APEX_CONTEXT_MENU.sql
- the plugin package specificationPRETIUS_APEX_CONTEXT_MENU.plb
- the plugin package bodydynamic_action_plugin_com_pretius_apex_contextmenu.sql
- the plugin installation file for Oracle APEX 5.1 or higher
To successfully install the plugin follow those steps:
- Install package
PRETIUS_APEX_CONTEXT_MENU
in Oracle APEX Schema - Install the plugin file
dynamic_action_plugin_com_pretius_apex_contextmenu.sql
The plugin checks entry defined conditions. For conditions types
- PLSQL_EXPRESION
- PLSQL_EXPRESSION
- FUNC_BODY_RETURNING_BOOLEAN
- EXISTS
- NOT_EXISTS
- NEVER
result is evaluated and if condition is not met then entry is not rendered. If entry condition is other type than listed above then entry is not rendered.
The plugin checks entry defined authorization scheme. If current result is true
then entry is rendered.
The plugin uses user defined attributes to change behaviour of the list entry. See table below
Property | Description |
---|---|
Attribute 01 | id used to identify entry |
Attribute 02 | when set to true then entry is disabled |
Attribute 03 | when set to true then entry is not rendered |
Attribute 04 | reserved by APEX navigation template to set title. Not working (?) |
Attribute 05 | reserved by APEX navigation template to set shortcut (?). Not working (?) |
Attribute 06 | provided text is used as accelerator text displayed right to entry label. |
Attribute 07 | when set to separator then display as horizontal separator |
Attribute 08 | not used |
Attribute 09 | not used |
Attribute 10 | not used |
- Create APEX List
POPUP_MENU
- Create entries and define according to your needs (authorisation scheme, action etc)
- Create new button
BTN_POPUP_MENU
- Create dynamic action
- Set
Event
toClick
- Set
Selection Type
toButton
- Set
Button
toBTN_POPUP_MENU
- Set
Advanced \ Event Scope
toDynamic
- Set
Advanced \ Static Container (jQuery Selector)
tobody
- Set
- Create
True
action- Set
Action
toPretius APEX Context Menu [Plug-In]
- Set
List name
toPOPUP_MENU
- Set
- Save & run page
Clicking the button BTN_POPUP_MENU
will create popup menu.
The plugin can be implemented to alter default context menu (right mouse button click).
- Create APEX List
POPUP_MENU
- Create entries and define according to your needs (authorisation scheme, action etc)
- Create dynamic action
- Set
Event
toCustom
- Set
Custom Event
tocontextmenu
- Set
Selection Type
toJavaScript Expression
- Set
JavaScript Expression
todocument
- Set
Advanced \ Event Scope
toDynamic
- Set
Advanced \ Static Container (jQuery Selector)
tobody
- Set
- Create
True
action- Set
Action
toPretius APEX Context Menu [Plug-In]
- Set
List name
toPOPUP_MENU
- [Optional] Set
Affected Elements
to narrow area in which context menu will be available. For example region.
- Set
- Save & run page
Contextual menu can be applied to any element by specyfing Selection Type
= jQuery Selector
. Contextual menu can be positioned differently:
- when
Selection Type
=JavaScript Expression
andJavaScript Expression
=document
then menu is positioned to right click event position propertiesevent.pageX
andevent.pageY
- when
Affected Elements
is defined then menu is available only for area defined by givenAffected Elements
- when
- When
Selection Type
=jQuery Selector
then menu is positioned to givenjQuery Selector
Please read inline help text for attribute Override Behaviour
for detailed information about JSON object extending existing list entry.
- Create APEX List
POPUP_MENU_EXTEND
- Create entry
- Set
List Entry Label
toExtended behaviour
- Set
Target type
toURL
- Set
URL Target
tojavascript: void(0);
- Set
User defined Attribute 1
toEXTENDED_BEHAVIOUR
- Set
- Create new button
BTN_POPUP_MENU_EXTEND
- Create dynamic action
- Set
Event
toClick
- Set
Selection Type
toButton
- Set
Button
toBTN_POPUP_MENU_EXTEND
- Set
- Create
True
action- Set
Action
toPretius APEX Context Menu [Plug-In]
- Set
List name
toPOPUP_MENU_EXTEND
- In
Settings
checkOverride Behaviour
- Set
Override behaviour
to*
- Set
- Save & run page
*
JavaScript code for point 5.iv
return {
"EXTENDED_BEHAVIOUR": {
"action": function( pMenuOptions, pTriggeringElement ){
//Code to be executed when users clicks on entry
alert('Altered action');
return void(0);
},
"disabled": function( pMenuOptions, pEntry ) {
return false;
},
"hide": function(pMenuOptions){
return false;
}
}
};
*
JavaScript code for point 5.iv
return {
"EXTENDED_BEHAVIOUR": {
"items": [
{
"type": "action",
"labelKey": "Action 1",
"action": function( pMenuOptions, pTriggeringElement ){
alert("Action 1");
}
},
{
"type": "action",
"labelKey": "Action 2",
"action": function( pMenuOptions, pTriggeringElement ){
alert("Action 2");
}
},
{
"type": "action",
"labelKey": "Action 3",
"action": function( pMenuOptions, pTriggeringElement ){
alert("Action 3");
}
}
]
}
};
List entry properties for APEX menu widget are described in official API. The plugin supports properties as follows:
Property | Is supported |
---|---|
type | Yes |
id | Yes |
label | Yes |
labelKey | Yes |
offLabel | No |
offLabelKey | No |
onLabel | No |
onLabelKey | No |
hide | Yes |
disabled | Yes |
iconType | No |
icon | Yes |
iconStyle | Yes |
href | Yes |
action | Yes |
set | No |
get | No |
accelerator | Yes |
menu* | No |
choices | No |
choices[].label | No |
choices[].labelKey | No |
choices[].value | No |
choices[].disabled | No |
choices[].accelerator | No |
current | No |
*
menu property is implemented via property items
to avoid unnecessary nested objects. See Inline Help Text
for attribute Override behaviour
for example implmentation.
Detailed information about how to use every attribute of the plugin is presented in built-in help texts in APEX Application Builder.
The plugin doesn't expose any extra events. To handle APEX menu events please refer official API.
The plugin does't use elements that can't be translated via APEX native translation capabilities.
Changelog for version v1.1.0 is described in details in this blog post
- support for accessibility,
Plugin
attribute settings has new been enhanced with new options to select,- Display at Mouse Position
- Narrow to Affected Elements
- Stop Event Propagation
JavaScript
attributes Override Behaviour and Add Extra Enties,- have extended access to dynamic actions attributes
- this.action - the action object containing details such as the action name and additional attribute values,
- this.browserEvent - the event object of event that triggered the event [3],
- this.data - optional additional data that can be passed from the event handler,
- have extended access to the plugin widget attributes
- this.element - a jQuery reference to the DOM object of the element that invoked a menu,
- this.id - unique identifier generated by the plugin to identify a menu container.
- have extended access to dynamic actions attributes
Plugin
debugging supports all levels: LOG, LEVEL6 and APP_TRACE,Plugin
error handling is more descriptive.
Initial Release
- not yet available
- Open modal page using Pretius APEX Context Menu
- Pretius APEX Enhanced LOV Item v1.1.0 supports Interactive Grid!
- APEX item Quick Picks as Context Menu
- Pretius Context Menu v1.1.0 in details
- Report checkbox menu aka Google Gmail
- Context Menu in Oracle APEX
Author | Website | Github | ||
---|---|---|---|---|
Bartosz Ostrowski | www.ostrowskibartosz.pl | @bostrowski | @bostrowsk1 | bostrowski@pretius.com |
Pretius Sp. z o.o. Sp. K.
Address | Website | |
---|---|---|
Przy Parku 2/2 Warsaw 02-384, Poland | http://www.pretius.com | office@pretius.com |
Pretius provides free support for the plugins at the GitHub platform. We monitor raised issues, prepare fixes, and answer your questions. However, please note that we deliver the plug-ins free of charge, and therefore we will not always be able to help you immediately.
Interested in better support?
- Become a contributor! We always prioritize the issues raised by our contributors and fix them for free.
- Consider comercial support. Options and benefits are described in the chapter below.
Have you found a bug or have an idea of additional features that the plugin could cover? Firstly, please check the Roadmap and Known issues sections. If your case is not on the lists, please open an issue on a GitHub page following these rules:
- issue should contain login credentials to the application at apex.oracle.com where the problem is reproduced;
- issue should include steps to reproduce the case in the demo application;
- issue should contain description about its nature.
If you encounter a problem during the plug-in implementation, please check out our demo application. We do our best to describe each possible use case precisely. If you can not find a solution or your problem is different, contact us: apex-plugins@pretius.com.
We consider our plugins as genuine open source products, and we encourage you to become a contributor. Help us improve plugins by fixing bugs and developing extra features. Comment one of the opened issues or register a new one, to let others know what you are working on. When you finish, create a new pull request. We will review your code and add the changes to the repository.
By contributing to this repository, you help to build a strong APEX community. We will prioritize any issues raised by you in this and any other plugins.
We are happy to share our experience for free, but we also realize that sometimes response time, quick implementation, SLA, and instant release for the latest version are crucial. That’s why if you need extended support for our plug-ins, please contact us at apex-plugins@pretius.com. We offer:
- enterprise-level assistance;
- support in plug-ins implementation and utilization;
- dedicated contact channel to our developers;
- SLA at the level your organization require;
- priority update to next APEX releases and features listed in the roadmap.