Results 1 to 6 of 6

Thread: Object doesn't support property or method 'onAdded'

  1. #1

    Default Object doesn't support property or method 'onAdded'

    I developed an asp.net application using Ext JS 4, Later, I tried to upgrade for Ext 4.2 which support right to left. I changed only javascript source (src) in my aspx page to new release, I have the following error "Object doesn't support property or method 'onAdded'".

  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    Are you using a call or override to onAdded in any of your custom classes?

  3. #3

    Default Error Details

    Error Details:

    SCRIPT438: Object doesn't support property or method 'onAdded'

    ext-all-debug.js, line 37529 character 17



    The following code causes this error:


    Ext.Ajax.request({
    url: 'portal/Dashboard/Predefined/FRM_DynamicAppMenu.aspx',
    success: function (response) {
    if (response.responseText.length > 0) {
    appMenuItems = eval(response.responseText);
    if (appMenuItems.length > 0) {
    var appMenu = Ext.create('Ext.menu.Menu', {
    id: 'appMenu',
    style: {
    overflow: 'visible'
    },
    items: [appMenuItems]});
    });
    .
    .
    .
    remaining of my code.
    .
    .

    .

  4. #4

    Default

    Quote Originally Posted by slemmon View Post
    Are you using a call or override to onAdded in any of your custom classes?
    No. I'm using " ext-4.2.0.663/ext-all-debug.js "

  5. #5
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    I tried to reproduce the issue using 4.2.0 and ext-dev and ext-all-debug using the below test case and sample response and didn't see an error. Can you modify my test case / sample data to reproduce the issue?

    client code
    Code:
    Ext.Ajax.request({
        //url: 'portal/Dashboard/Predefined/FRM_DynamicAppMenu.aspx',
        url: 'data/json.json',
        success: function (response) {
            if (response.responseText.length > 0) {
                var appMenuItems = Ext.JSON.decode(response.responseText);
                if (appMenuItems.length > 0) {
                    var appMenu = Ext.create('Ext.menu.Menu', {
                        id: 'appMenu',
                        style: {
                            overflow: 'visible'
                        },
                        items: [appMenuItems]
                    });
                }
            }
        }
    });
    server response
    Code:
    {
        "success": true,
        "data": [{
            "company": "Sencha"
        }]
    }

  6. #6

    Default

    Thanks Slemmon for your help. The error has solved using the following code:
    Ext.Ajax.request({
    url: 'portal/Dashboard/Predefined/FRM_DynamicAppMenu.aspx',
    success: function (response) {
    if (response.responseText.length > 0) {
    appMenuItems = eval(response.responseText);
    if (appMenuItems.length > 0) {
    var appMenu = Ext.create('Ext.menu.Menu', {id: 'appMenu'});
    Ext.each(appMenuItems,function(item){ appMenu.add(item); });
    .
    .
    .
    remaining of my code
    .
    .
    .

Posting Permissions

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