6 Mar 2012 11:26 AM #1
How to load new view
How to load new view
6 Mar 2012 11:26 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
That should work as long as it's not before the launch method on Ext.application/Ext.setup fires.Mitchell Simoens @SenchaMitch
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.
6 Mar 2012 11:44 AM #3
It does not seem to work. When I switch the "non working view" to the initial view everything works as expected. I am also using Designer 2, not sure if that has any effect?
7 Mar 2012 3:02 PM #4
Is there something else that should be called after calling Ext.create on the class? I was able to make the 2 container views work by putting them into a generic nav container with card layout and linking the 2 views into it. However in one of my views I am creating a panel popup using Ext.create and the listeners are unresponsive. If I add this panel to the generic nav container the buttons work but it is overlayed on my initial screen and I only want it to appear at a specific time.
7 Mar 2012 5:35 PM #5
Create the view, add it to the viewport and then set it to active via its itemId or index in the items collection.Aaron Conran
8 Mar 2012 9:53 AM #6
Thanks Aaron. The add step seems to be the step I was missing from above. Ext.Viewport.add then Ext Viewport.setActiveItem
8 Mar 2012 11:50 AM #7
The app is doing what I want however I keep getting the error
- [COLOR=red !important]25192Uncaught Error: [ERROR][Ext.Container#setActiveItem] Setting activeItem to be a non-inner item[/COLOR]
Should I be concerned?
20 Mar 2012 8:51 PM #8
Another reason I found for the events not firing is having a value in the "id" field. Normally I don't need this but it's making it difficult to CSS style very specific screens. Should I be able to have an "id" value for the top level containers?