View Full Version : Creating Window using Viewport or Not?

21 Mar 2012, 10:37 PM
I am pretty much new to ExtJs and trying to achieve an application where I can drop a couple of Windows on my browser with Grid's inside.

Now reading and following the MVC method of doing things it seems like using viewport on the main js are the way to go.

Now creating panels in there isn't to hard at using controllers and views. But I don't want panels, I want to use Windows like in the example portal demo (http://docs.sencha.com/ext-js/4-0/#!/example/portal/portal.html).

Do I need a viewport? Or do we only use viewports for Pannel's?

Can I get a complete example code of how to create a portal like the portal demo.

Any help will be appreciated.

22 Mar 2012, 6:52 AM
If you want to use Ext.window.Window then you don't need anything. It will, by default, render to the document body and display without any other component like Viewport.

22 Mar 2012, 9:51 PM
Ok so let me quickly sum up what I understand.

Using viewport allows me to utilize the whole area of the browser, meaning that if I do add panels it will keep the panels in the correct positions all the time?

Let's say I want to add the "Ext.window.Window" and ""Ext.panel.Panel" like in the demo.

Would I create a viewport for the panels or just keep everything in the body?

Thanks for the advice.

18 Jan 2013, 9:54 AM
wondering the same, when my I use to Ext.create('Ext.window.Window'

the created window behave very different, it break the framework or dragging window or reize does not work.

Can you please share your code?