PDA

View Full Version : How to extend customizing class which extens ExtJS class ?



jeongyej
15 Jan 2014, 8:44 PM
Hi, Can anyone help me out to know how to extend customizing class which extends ExtJS class ?
Here are codes that I put.

I made the customizing class, "com.amkor.web.common.client.FormPanel" which extends ExtJS clsss, "Ext.form.Panel".

Ext.define('com.amkor.web.common.client.FormPanel', {
alias : 'Web.common.client.FormPanel',
extend : 'Ext.form.Panel',
initComponent : function(){
var me = this;
Ext.applyIf(me, {
id : 'formPanel',
title : 'Form',
layout : 'auto',
border : true,
width : 570,
height : 300,
bodyPadding : 5,
autoDestory : true
});
me.callParent(arguments);
}
});

And then I want to define new class which extends "com.amkor.web.common.client.FormPanel".
Is it possible to do it ? If it is, how do I handle it ?

Please give me an advie !!

palakurthivishal
16 Jan 2014, 12:58 AM
Hello Jeongyej,
Here is some working example which can help you out...


Ext.define('Test', { extend : 'Ext.form.Panel', callMe : function(){ console.log(0);}});
var a = Ext.create('Test');
a.callMe();

Ext.define('TEst1', { extend : 'Test', callMe : function(){ console.log(1);}});
var b = Ext.create('TEst1');
b.callMe();
b.superclass.callMe();