-
5 Aug 2011 4:31 AM #1
Selecting components with Ext.ComponentQuery.query(), with dots in alias
Selecting components with Ext.ComponentQuery.query(), with dots in alias
Affected Version: ExtJS 4.0.2
Browser: Firefox 5.
Ext.ComponentQuery.query() does not work as expected (returns always zero items) when calling:
the grid having the alias defined as widget.nt.Grid.Code:Ext.ComponentQuery.query('ns.Grid')
In the API it is not written that the . is an invalid character in the alias, so this is a problem of the query() method.
-
5 Aug 2011 4:33 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,634
- Vote Rating
- 435
This has already been reported. Suggested workaround for now is use something else.. I have been using '_'
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.
-
8 Aug 2011 8:49 AM #3
we've got this issue fixed in ext-4.0.5 (EXTJSIV-2577), I've tagged this thread as fixed accordingly.
-
16 Aug 2011 2:06 AM #4
I use version 4.0.5 and it does NOT work.
My Code:
Ext.define('MyApp.ns.subns.Section', {
extend: 'Ext.form.FieldSet',
alias: 'widget.ns.subns.Section',
initComponent: function() {
var me = this;
me.items = [{xtype: 'panel', title: 'Title'}]
me.callParent(arguments);
}
});
var f = Ext.create('MyApp.ns.subns.Section', {renderTo: Ext.getBody()});
f.show();
console.log( Ext.ComponentQuery.query('ns.subns.Section') );//logs an 0-length array
console.log( Ext.versions.extjs.shortVersion );//logs 405
-
20 Jan 2012 3:59 AM #5
-
27 Jul 2012 5:07 PM #6Ext JS Premium Member
- Join Date
- Nov 2007
- Location
- New Hampshire/New England - USA
- Posts
- 42
- Vote Rating
- 0
Issue still exists with 4.1.1
Issue still exists with 4.1.1

Success! Looks like we've fixed this one. According to our records the fix was applied for
a bug in our system
in
a recent build.


Reply With Quote