0

グリッドに次のようなカスタムアクション列があります。

Ext.define('Profiler.view.Common.ActionColumn', {
    alias: 'widget.asaActionColumn',
    extend: 'Ext.grid.column.Action',
    items: [{
        iconCls: 'edit',
        tooltip: __("Edit"),
        handler: function (grid, rowIndex, colIndex) {
            this.fireEvent('itemedit', grid, rowIndex, colIndex);
        }
    }, {
        iconCls: 'delete',
        tooltip: __("Delete"),
        handler: function (grid, rowIndex, colIndex) {
            this.fireEvent('itemdelete', grid, rowIndex, colIndex);
        }
    }, {
        iconCls: 'information',
        tooltip: __("Info"),
        handler: function (grid, rowIndex, colIndex) {
            this.fireEvent('PersonageInformation', grid, rowIndex, colIndex);
        }
    }]

});

しかし、レンダリングページが機能しない場合: ここに画像の説明を入力してください

4

1 に答える 1

0

わかりました。次のようにコンストラクターをオーバーライドします。

Ext.define('Profiler.view.Common.ActionColumn', {
    alias: 'widget.asaActionColumn',
    extend: 'Ext.grid.column.Action',
    constructor: function (config) {
        this.initialConfig = config;
        this.itemId = config.itemId = (config.itemId || config.id || Ext.id());
        this.callParent(arguments);

        this.items = [{
            iconCls: 'Edit',
            tooltip: __("Edit"),
            handler: function (grid, rowIndex, colIndex) {
                this.fireEvent('itemedit', grid, rowIndex, colIndex);
            }
        }, {
            iconCls: 'delete',
            tooltip: __("Delete"),
            handler: function (grid, rowIndex, colIndex) {
                this.fireEvent('itemdelete', grid, rowIndex, colIndex);
            }
        }, {
            iconCls: 'information',
            tooltip: __("Info"),
            handler: function (grid, rowIndex, colIndex) {
                this.fireEvent('PersonageInformation', grid, rowIndex, colIndex);
            }
        }];

    },

});
于 2013-02-06T10:32:11.723 に答える