PDA

View Full Version : Using MVC without a Viewport



daltenhof
13 Mar 2012, 7:27 AM
This is a newb question, but has left me a bit puzzled. The "Architecting Your App" tutorial in Sencha Learn discusses creating an app using the MVC pattern, but only shows how to do this when you are using a Viewport that will take up your whole window. How would you do this if you want your app to live in a div somewhere on an existing webpage, perhaps in a simple container or panel. Do you still define a app/view/Viewport.js file? How do you specify the div you want to target for your app?

daltenhof
13 Mar 2012, 9:10 AM
I figured it out. Apparently the Viewport.js file does not have to extend an actual Viewport. It can extend other containers, and with "renderTo" one can target a specific div.