Usage
Basic usage
- Create APEX List
POPUP_MENU - Create entries and define according to your needs (authorization scheme, action, etc)
- Create new button
BTN_POPUP_MENU - Create dynamic action
- Set
EventtoClick - Set
Selection TypetoButton - Set
ButtontoBTN_POPUP_MENU - Set
Advanced \ Event ScopetoDynamic - Set
Advanced \ Static Container (jQuery Selector)tobody
- Set
- Create
Trueaction- Set
ActiontoUnited Codes Context Menu [Plug-In] - Set
List nametoPOPUP_MENU
- Set
- Save & run a page
Clicking the button BTN_POPUP_MENU will create a popup menu.
Contextual menu
The plug-in can be implemented to alter the default context menu (right mouse button click).
- Create APEX List
POPUP_MENU - Create entries and define according to your needs (authorization scheme, action, etc)
- Create dynamic action
- Set
EventtoCustom - Set
Custom Eventtocontextmenu - Set
Selection TypetoJavaScript Expression - Set
JavaScript Expressiontodocument - Set
Advanced \ Event ScopetoDynamic - Set
Advanced \ Static Container (jQuery Selector)tobody
- Set
- Create
Trueaction- Set
ActiontoUnited Codes Context Menu [Plug-In] - Set
List nametoPOPUP_MENU - [Optional] Set
Affected Elementsto narrow the area in which context menu will be available. For example region.
- Set
- Save & run a page
The contextual menu can be applied to any element by specifying Selection Type = jQuery Selector.
The contextual menu can be positioned differently:
- when
Selection Type=JavaScript ExpressionandJavaScript Expression=documentthen menu is positioned to right-click event position propertiesevent.pageXandevent.pageY- when
Affected Elementsis defined then the menu is available only for the area defined by the givenAffected Elements
- when
- When
Selection Type=jQuery Selectorthen the menu is positioned to givenjQuery Selector
Advanced usage
Please read inline help text for attribute Override Behaviour for detailed information about JSON object extending existing list entry.
Create APEX List
POPUP_MENU_EXTENDCreate entry
- Set
List Entry LabeltoExtended behavior - Set
Target typetoURL - Set
URL Targettojavascript: void(0); - Set
User-defined Attribute 1toEXTENDED_BEHAVIOUR
- Set
Create new button
BTN_POPUP_MENU_EXTENDCreate dynamic action
- Set
EventtoClick - Set
Selection TypetoButton - Set
ButtontoBTN_POPUP_MENU_EXTEND
- Set
Create
Trueaction- Set
ActiontoUnited Codes Context Menu [Plug-In] - Set
List nametoPOPUP_MENU_EXTEND - In
SettingscheckOverride Behaviour - Set
Override behaviorto [1]
- Set
Save & run a page
Alter entry behavior
[1] JavaScript code for point 5.d
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;
}
}
};
Add submenu
[1] 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");
}
}
]
}
};