Article

Override Ext.js class

Example override class SummaryModule

SummaryModuleV2.js

define("UsrSummaryModuleV2", ["SummaryModuleV2"],
    function() {
        Ext.define("Terrasoft.SummaryModuleOverrided", {
            override: "Terrasoft.SummaryModule",
 
           /*
            * @override
            */
            getESQ: function() {
                var esq = this.callParent(arguments);
                esq.queryKind = Terrasoft.QueryKind.LIMITED;
                return esq;
            }
        });
    }
);

On the page, which use base class you need to add dependency to overridden class:

BaseSectionV2

define("BaseSectionV2", ["UsrSummaryModuleV2"], function() {
    return {
        methods: {},
        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
        diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
    };
});

 

Like 0

Like

Share

0 comments
Show all comments