我的 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
我该如何解决?