Results 1 to 2 of 2

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

  1. #1

    Default 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

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    First, please use BBCode when posting code so it stays formatted.

    From your unformatted code, the only this I see wrong right away is this line:

    Code:
    store: Ext.data.StoreManager.lookup('mysrore'),
    should just be:

    Code:
    store: 'mysrore',
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •