ORACLE APEX IG(交互式网格/报表 )工具栏的客户化

比如在工具栏按钮中需要添加一个客户化按钮,点击这个按钮,执行动态操作或者js代码


function (config) {
    var $ = apex.jQuery,
    // Make a copy of the default toolbar
    toolbarData = $.apex.interactiveGrid.copyDefaultToolbar(),
    /*  // Remove the search menu group
    toolbarGroup = toolbarData.toolbarRemove("search");
    // Remove the reports menu group
    toolbarGroup = toolbarData.toolbarRemove("reports");
    // Remove the views menu group
    toolbarGroup = toolbarData.toolbarRemove("views");
    // Remove the actions2 menu group
    toolbarGroup = toolbarData.toolbarRemove("actions2");
    // Remove the actions3 menu group
    toolbarGroup = toolbarData.toolbarRemove("actions3");
    // Remove the actions4 menu group
    toolbarGroup = toolbarData.toolbarRemove("actions4"); */
    // Locate the actions menu group
    toolbarGroup = toolbarData.toolbarFind("actions3");

    // Add new control elements here
    toolbarGroup.controls.push({
        type: "BUTTON",
        label: "My Button",
        icon: "fa fa-american-sign-language-interpreting",
        iconBeforeLabel: true,
        hot: true,
        action: "my_action"
    });

    toolbarGroup.controls.push({

        type: "BUTTON",
        label: "My DA Button",
        icon: "fa fa-play",
        iconBeforeLabel: true,
        hot: true,
        action: "my_da"
    });

    config.initActions = function (actions) {
        actions.add({
            name: "my_action",
            action: function () {
                apex.submit({request:'P12_APPLY_LOAD',validate:true});
            }
        });
        actions.add({
            name: "my_da",
            action: function () {
                $.event.trigger('my_da');
            }
        });
    }

    // Assign new toolbar data back to toolbarData configuration property
    config.toolbarData = toolbarData;
    // Return the config
    return config;
}

参考资料:
https://blogs.ontoorsolutions.com/post/3-ways-to-add-custom-button-in-interactive-grid-oracle-apex/
https://thtechnology.com/2017/07/21/apex-interactive-grid-customize-toolbar/
https://tm-apex.hashnode.dev/customize-your-toolbar-interactive-grid-9

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

贤时间

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值