-
12 Jul 2012 12:18 AM #1
ComponentQuery with advanced attribute selector
ComponentQuery with advanced attribute selector
Hi ...
bit more of a RFE instead of a bug ... but what really bugs me, is that I can't query components that have multiple attributes. For example
Now I want to query the imprint container. This one worksCode:{ xtype:'container', cls: 'overlay-footer', items:[ { html: 'Imprint', cls: 'overlay-footer-item overlay-footer-imprint', } ] }
This one doesn'tCode:Ext.ComponentQuery.query('.container[cls="overlay-footer-item overlay-footer-imprint"]')
Ok, makes sense ... according to http://www.w3.org/TR/CSS2/selector.html this would be the way to do itCode:Ext.ComponentQuery.query('.container[cls="overlay-footer-imprint"]')
Am I missing something or is this not supported?Code:Ext.ComponentQuery.query('.container[cls~="overlay-footer-imprint"]')
Bests
wirtsi
-
12 Jul 2012 6:58 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
I would say this is a feature request as it has never intended to work. I have a draft that I will see what the cor devs think for possible inclusion into 2.1.0
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.
-
12 Jul 2012 10:02 AM #3
...or you could create and use a (custom) "pseudo" selector until that feature is added.
http://docs.sencha.com/touch/2-0/#!/...ComponentQueryLast edited by Bunchofstring; 12 Jul 2012 at 10:05 AM. Reason: Added shortcut to docs
-
9 Sep 2012 7:56 PM #4
Is this gonna make it into ExtJs as well?
And what syntax will be supported? cls="myclass" or cls*="myclass" or..?
I think this really should be supported. It is a fairly obvious and common use-case.
So thx for pushing this, mitchell!
-
15 Nov 2012 5:11 AM #5
Any progress ?
Any progress ?
Has there been any progress regarding this topic ?
I have the same config as the OP and neither ~= nor *= works using 2.1
Has it been included in Sencha Touch 2.1
-
10 Feb 2013 8:08 PM #6
No luck for me in 2.1 either and don't see anything in the source when I step through it that'd accomplish this.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-3115
in
Sprint 23 (2.0.3/2.1.0-b1).


Reply With Quote