-
7 May 2012 12:05 AM #1
ControllerAction working on more then one component
ControllerAction working on more then one component
Hi,
I have x lists and would like the same ControllerAction to work with them all.
So looking at:
http://docs.sencha.com/touch/2-0/#!/...y-method-query
I thought I could do something like.
controlQuery:
listOne, listTwo
But this gives me a Sencha JSON error when clicking on one of the lists.
What is the correct syntax fot this in Architect?
-
7 May 2012 1:37 PM #2
Hi,
Whats your exact query line? Just specifying 'list' in controlQuery(the xtype) should match all lists.
RegardsBharat Nagwani
Sencha Designer Development Team
-
7 May 2012 8:40 PM #3
I don't want it to hit ALL list but the lists I specify by xtype or ID.
-
7 May 2012 8:49 PM #4
Are you using exactly as 'listOne, listTwo' or '#listOne, #listTwo'
Bharat Nagwani
Sencha Designer Development Team
-
7 May 2012 9:22 PM #5
I have tried both. If I only use one it works. If I choose both with "," I get a sencha runtime error.
-
7 May 2012 9:59 PM #6
Are both lists visible in the dom?
Use # to match the Id's
Ext.ComponentQuery.query("#id1,#id2")
I just tried a formPanel with 2 textfields with Ids and it returns both fields.Bharat Nagwani
Sencha Designer Development Team
-
7 May 2012 10:21 PM #7
-
7 May 2012 11:07 PM #8
I will get some details tomorrow. Most likely its not going to be possible since the controller action gets init'ed as soon as first component is initialized when you use id.
What i did was add custom property (or use a standard property if there are similarities between the 2 lists)
and added list[prop=value] in the control query and that workedBharat Nagwani
Sencha Designer Development Team


Reply With Quote