-
25 Oct 2012 10:14 AM #1
Problem with List Event Listener
Problem with List Event Listener
Greetings:
Using ST2, I define a small list using the MVC pattern. When the application runs, all appears to work; however when I atttempt to listen to the "show" event on the grid, nothing happens. The selectionchange event on the grid that works fine....any insight? Thanks
Code:Ext.define('GlsAmCrm.controller.appController',{ extend: 'Ext.app.Controller', config:{ refs: {}, control: { 'grplist':{ show: function(){ console.log('Grid Has Been Initialized!'); }, selectionchange: function(){ console.log('Changed'); } } } } });Code:/** * GrpData List **/ Ext.define('GlsAmCrm.view.grpdata.grpList',{ extend: 'Ext.List', xtype: 'grplist', config:{ grouped: true, indexBar: true, flex: 1, store: 'grpStore', itemTpl:'{groupname}' } });
-
27 Oct 2012 12:28 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,619
- Vote Rating
- 434
Usually what I see people doing in the show method could be handled somewhere else. What are you going to be doing in show?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
27 Oct 2012 4:05 AM #3
Hey Mitchell:
In EXTJS4 I would use the show event to load the record store for the list and select the first record in the list. I had to use the show event because I wanted to make sure the list was rendered before the selection. Would like to have the same ability in ST2.
TB55


Reply With Quote