1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    25
    Vote Rating
    0
    akshar_jamgaonkar is on a distinguished road

      0  

    Default Unanswered: Click event been fired even if no event wirrten for it when using the prperty itemTpl

    Unanswered: Click event been fired even if no event wirrten for it when using the prperty itemTpl


    HI,

    I have created a simple app, in which a panel and a view are dynamically pouplated on click of grid row. Everything is working fine however when i click on the view row i get a error as "o is undefined". I have however not specified any event handler for that view.

    below is my viewport code

    Ext.define('Cricket.view.Viewport', {
    extend: 'Ext.container.Viewport',
    layout: 'fit',

    requires: [
    'Cricket.view.CountryList',
    'Cricket.view.TeamList',
    'Cricket.view.CountryDetails'
    ],

    initComponent: function() {
    this.items = {
    layout: {
    type: 'hbox',
    align: 'stretch'
    },
    items: [{
    width: 250,
    xtype: 'panel',
    id: 'west-region',
    layout: {
    type: 'vbox',
    align: 'stretch'
    },
    items: [{
    xtype: 'countrylist',
    flex: 1
    }, {
    html: 'Ad',
    height: 250,
    xtype: 'panel'
    }]
    }, {
    xtype: 'container',
    flex: 1,
    layout: {
    type: 'vbox',
    align: 'stretch'
    },
    items: [{
    xtype: 'countrydetails',
    height: 250
    }, {
    xtype: 'teamlist',
    flex: 1
    }]
    }]
    };

    this.callParent();
    }
    });



    // Below is my view code


    Ext.define('Cricket.view.CountryDetails', {
    extend: 'Ext.view.View',
    alias: 'widget.countrydetails',
    store: 'CountryResults',
    itemTpl: '<div>{desc}</div>',
    update: function(item) {
    if(item)
    this.callParent([item.data]);
    }
    });



    Any help would be appriciated.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,074
    Answers
    3500
    Vote Rating
    854
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What class/method is this being fired on?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    25
    Vote Rating
    0
    akshar_jamgaonkar is on a distinguished road

      0  

    Default


    its been fired on widget.countrydetails, however i have not defined any event or event handler for the same.


    When the application loads widget.countrydetails class is used to display all the country details ,when i click on the list generated by widget.countrydetails for first time the evnet does not get fired.

    But second time when the list is generated again the event gets fired on same class.

Thread Participants: 1