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.
MIT
https://apex.oracle.com/pls/apex/f?p=PRETIUS_APEX_CONTEXT_MENU:1
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 higherTo successfully install the plugin follow those steps:
PRETIUS_APEX_CONTEXT_MENU
in Oracle APEX Schemadynamic_action_plugin_com_pretius_apex_contextmenu.sql
The plugin checks entry defined conditions. For conditions types
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 |
POPUP_MENU
BTN_POPUP_MENU
Event
to Click
Selection Type
to Button
Button
to BTN_POPUP_MENU
Advanced \ Event Scope
to Dynamic
Advanced \ Static Container (jQuery Selector)
to body
True
action
Action
to Pretius APEX Context Menu [Plug-In]
List name
to POPUP_MENU
Clicking the button BTN_POPUP_MENU
will create popup menu.
The plugin can be implemented to alter default context menu (right mouse button click).
POPUP_MENU
Event
to Custom
Custom Event
to contextmenu
Selection Type
to JavaScript Expression
JavaScript Expression
to document
Advanced \ Event Scope
to Dynamic
Advanced \ Static Container (jQuery Selector)
to body
True
action
Action
to Pretius APEX Context Menu [Plug-In]
List name
to POPUP_MENU
Affected Elements
to narrow area in which context menu will be available. For example region.Contextual menu can be applied to any element by specyfing Selection Type
= jQuery Selector
. Contextual menu can be positioned differently:
Selection Type
= JavaScript Expression
and JavaScript Expression
= document
then menu is positioned to right click event position properties event.pageX
and event.pageY
Affected Elements
is defined then menu is available only for area defined by given Affected Elements
Selection Type
= jQuery Selector
then menu is positioned to given jQuery Selector
Please read inline help text for attribute Override Behaviour
for detailed information about JSON object extending existing list entry.
POPUP_MENU_EXTEND
List Entry Label
to Extended behaviour
Target type
to URL
URL Target
to javascript: void(0);
User defined Attribute 1
to EXTENDED_BEHAVIOUR
BTN_POPUP_MENU_EXTEND
Event
to Click
Selection Type
to Button
Button
to BTN_POPUP_MENU_EXTEND
True
action
Action
to Pretius APEX Context Menu [Plug-In]
List name
to POPUP_MENU_EXTEND
Settings
check Override Behaviour
Override behaviour
to *
*
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
Plugin
attribute settings has new been enhanced with new options to select,
JavaScript
attributes Override Behaviour and Add Extra Enties,
Plugin
debugging supports all levels: LOG, LEVEL6 and APP_TRACE,Plugin
error handling is more descriptive.Initial Release
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?
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:
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: