Results 1 to 3 of 3

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

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    25
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    What class/method is this being fired on?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    25
    Vote Rating
    0
      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.

Posting Permissions

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