-
17 Jan 2012 11:16 AM #1
Unanswered: NestedList - jump to a card ( setActiveItem ? )
Unanswered: NestedList - jump to a card ( setActiveItem ? )
Hello
I am trying to trigger a nestedlist to open a specific detailcard.
I'm trying to use the setActiveItem method but am unsure of the syntax, so...
- how do I target the nestedlist? (can I use Ext.getCmp) ?
- how do I target the detailcard to open?
I've tried:
plus so many more combinations, just can't nail it. Please put me out of my miseryCode:var myNestedList = Ext.getCmp('nestedListComponentID'); myNestedList.setActiveItem(3); // set by component ID and card index? myNestedList.setActiveItem('detailcardxtype'); // set by detail card's xtype name as set in the store? myapp.views.NestedListMenu.setActiveItem(3); // from where the list was created, eg myapp.views.NestedListMenu = Ext.extend(Ext.NestedList, {...
PS. I also set the layout of the nestedlist toAny help would be most appreciated!Code:layout: {type: 'card'}
Thanks
NJ
-
17 Jan 2012 11:23 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
NestedList already uses card layout so you do not need to set it. To target the NestedList I would not use id and getCmp. You can put it on the namespace or use ComponentQuery to resolve it. NestedList switches active item per the node that was tapped.
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.
-
18 Jan 2012 12:48 AM #3
Can you jump to a NestedList detailCard programmatically, using setActiveItem?
Thanks


Reply With Quote