dimanche 6 juillet 2014

Uncaught TypeError: Object [object Object] has no method 'onAdded'

Hi,

I have created a view with xtype:'employeesearchresults'.Now, i am tryng to use this view in another view which is of type employee search. if employee is available i want to display the employee details in a GRID.I am tryng to use employeeresults.js in my employeesearch.js using xtype:'employeesearchresults' am facing the following error.


Uncaught TypeError: Object [object Object] has no method 'onAdded'


employeesearch.js:

--------------------


Ext.define('a.view.main.employeesearch', {

extend: 'Ext.container.Container',

xtype: 'app-main',


controller: 'main',

id:'myview1',

requires:[

'Ext.form.FieldSet',

'Ext.grid.Panel',

'Ext.toolbar.Spacer',

'a.view.customersearchresults'

],

items:[

{

xtype:'panel',

items:[

{

xtype:'tabpanel',

items:[


{

title: 'employee Search',


items:[

{

xtype:'fieldset',

title:'employee Search',

items :[{

xtype: 'textfield',


fieldLabel:'Last Name',

id:'lastName',

labelWidth: 130

}, {

xtype: 'textfield',


fieldLabel:'First Name',

id:'firstName',

labelWidth: 130

},

{

xtype: 'textfield',

fieldLabel:'Organisation Name',

id:'organisationName',

labelWidth: 130

},

{

xtype:'button',

text:'search',

margin:'0 0 0 100',

name:'search',

action:'submit'

}]

},

{

xtype:'employeesearchresults'

}


]


},


]

}


]


}]


});


employeesearchresults.js:

---------------------------


Ext.define('a.view.customersearchresults',{

extends:'Ext.grid.Panel',

xtype:'employeesearchresults',

alias:'widget.employeesearchresults',

requires:['a.store.csstore'],

items:[{


title:'employeesearchresults',

store: Ext.data.StoreManager.lookup('mysrore'),

columns:[{

text:'Name',

dataIndex:'fullName'

}]

}]


});

Please help me to resolve this issue.

Thanks in Advance,

Nenavath





Aucun commentaire:

Enregistrer un commentaire