Oracle APEX - Error in action for 'xxx'. TypeError: Cannot read property 'dialogClass' of undefined

Oracle APEX - Error in action for 'xxx'. TypeError: Cannot read property 'dialogClass' of undefined

我的 IG 上有一个自定义按钮,可以打开模式对话框页面。这是我使用的代码:

function(config) {
   var $ = apex.jQuery,
     toolbarData = $.apex.interactiveGrid.copyDefaultToolbar(),
     toolbarGroup = toolbarData.toolbarFind("actions4"); 


     toolbarGroup.controls.push( {
         type: "BUTTON",
         label: "My Button",    
         action: "my-action",
         hot: true
     });

    config.toolbarData = toolbarData;

     config.initActions = function( actions ) {     
         actions.add( {
         name: "my-action",
         label: "My Action",
         action: function(event, focusElement) {
             javascript:apex.navigation.dialog('f?p=&APP_ID.:2:&SESSION.');
         }
      } );

   }
   return config;
}

当我 运行 页面并单击按钮时,我在控制台中收到错误消息:

Error in action for 'my-action'. TypeError: Cannot read property 'dialogClass' of undefined

我该如何解决?

如果您查看 JavaScript 文档,您必须为 apex.navigation.dialog 函数提供额外的参数:

https://docs.oracle.com/en/database/oracle/application-express/19.2/aexjs/apex.navigation.html#.fn:dialog


    apex.navigation.dialog(
      url,
      {
        title: 'Orders',
        height: '480',
        width: '800',
        modal: true,
        resizable: true
      },
      'a-Dialog--uiDialog',
      $('#mybutton_static_id')
    );
</pre>