Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extending the IG Actions Menu

drossoMar 3 2020 — edited Mar 4 2020

Hello,

I'm trying to extend the default actions menu of an IG by adding a menu voice labeled "Upload" (I want my users to be able to upload records from a .csv file and I don't want to add a button outside the existing menu).

I've found this javscript code in the IG documentation that seemed a good starting point:

function( options ) {

     options.initActions = function( actions ) { 

     // Hide all elements associated with the show help dialog action

     actions.hide( "show-help-dialog" ); 

     // Add a keyboard shortcut to the show filter dialog action

     actions.lookup( "show-filter-dialog" ).shortcut = "Ctrl+Alt+F";

     actions.update( "show-filter-dialog" ); 

     // Add new actions, either singularly passing in an actions object as shown here, or in // multiple by passing an array of action objects

     actions.add( {

          name: "my-action", label: "Hello", action: function( event, focusElement ) {

               alert( "Hello World!" ); }

          } );

     };

     return options;

}

The problem is that while hiding and updating actions work as expected, there is no way to add the "Hello" action: what am I doing wrong ?

Thank you.

This post has been answered by John Snyders-Oracle on Mar 3 2020
Jump to Answer

Comments

Post Details

Added on Mar 3 2020
7 comments
1,434 views