wallynm
6 Dec 2011, 6:16 AM
Hello guys, i'm with some trouble when i try to get the parent class name...
This is my code:
Ext.define('gconnect.view.Financeiro.Categorias.CargosFuncoes.Form', {
extend: 'Ext.helper.Abstract.DefaultEditWindow',
alias: 'widget.CargosFuncoesForm',
id:'CargosFuncoesForm',
title: 'Editar Cargos/Funções',
windowItems: [{
xtype: 'form',
border:false,
defaultType: 'textfield',
bodyPadding: 5,
items: [{
fieldLabel: 'Cargo/Função',
name : 'cargo',
anchor: '100%',
labelWidth: 110,
allowBlank: false
}]
}]
});
It extend to this class:
Ext.define('Ext.helper.Abstract.DefaultEditWindow', {
extend: 'Ext.window.Window',
layout: 'anchor',
autoShow: true,
modal: true,
width: 400,
windowItems: undefined,
initComponent: function() {
this.items = this.windowItems;
this.buttons = [{
text: 'Salvar',
action: 'atualizarRegistro'
},{
text: 'Salvar',
action: 'inserirRegistro'
}, {
text: 'Cancelar',
action: 'cancelar',
scope: this,
handler: this.close
}];
this.callParent(arguments);
}
});
Well, what i'm needing is get the class name inside Ext.helper.Abstract.DefaultEditWindow, so, if gconnect.view.Financeiro.Categorias.CargosFuncoes.Form are extending to defaultEditWindow, i would like to get this name to define some default values.
This is my code:
Ext.define('gconnect.view.Financeiro.Categorias.CargosFuncoes.Form', {
extend: 'Ext.helper.Abstract.DefaultEditWindow',
alias: 'widget.CargosFuncoesForm',
id:'CargosFuncoesForm',
title: 'Editar Cargos/Funções',
windowItems: [{
xtype: 'form',
border:false,
defaultType: 'textfield',
bodyPadding: 5,
items: [{
fieldLabel: 'Cargo/Função',
name : 'cargo',
anchor: '100%',
labelWidth: 110,
allowBlank: false
}]
}]
});
It extend to this class:
Ext.define('Ext.helper.Abstract.DefaultEditWindow', {
extend: 'Ext.window.Window',
layout: 'anchor',
autoShow: true,
modal: true,
width: 400,
windowItems: undefined,
initComponent: function() {
this.items = this.windowItems;
this.buttons = [{
text: 'Salvar',
action: 'atualizarRegistro'
},{
text: 'Salvar',
action: 'inserirRegistro'
}, {
text: 'Cancelar',
action: 'cancelar',
scope: this,
handler: this.close
}];
this.callParent(arguments);
}
});
Well, what i'm needing is get the class name inside Ext.helper.Abstract.DefaultEditWindow, so, if gconnect.view.Financeiro.Categorias.CargosFuncoes.Form are extending to defaultEditWindow, i would like to get this name to define some default values.