21 Feb 2012 8:54 PM #1
Unanswered: Routes misunderstanding.
Here is my use case, when a specific route ( 'biscuitlocator' ) is triggered, I need 2 controllers to perform certain actions to their respective views. However, this isn't working in my application as the url changes but the view doesn't. If I comment out one route in a controller but not the other it works and hits my route dependent code, but it doesn't work when I have 'biscuitlocator' in both controllers.
I was thinking I had a misunderstanding about routes and how they work with the various controllers of the application.
Any help is greatly appreciated.
22 Feb 2012 6:24 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
You will need to daisy chain the controller methods. Have only one route and in that handler execute a method in the other controller via:
var controller = this.getController('secondcontroller') controller.someFn.apply(controller, arguments);Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
22 Feb 2012 10:54 AM #3
When you say use an abstract controller, do you mean have a controller that is the parent class of all of my controllers and contains all the routes, so each one can respond ?