View Full Version : Ext.Application, viewport and site design

14 Mar 2011, 4:10 AM

I'm planning to switch an existing web application to Ext JS 4.

I really like your MVC approach, the models and the way everything works together :)

It was easy to me to set up my prototype application using the new Ext.Application class. Now I'm having trouble to initialize the viewport correctly.

In your sample applications you always use document.body as your viewport. Unfortunately this is not a choice for me because I have a custom design and can't make use of the Ext JS rendering.

My simplified site design looks like this:

<div id="header">...</div>
<div id="navigation">...</div>
<div id="content">...</div>
<div id="footer">...</div>

The controllers should render the views to #content.

I've found an interesting post (http://www.fusioncube.net/index.php/sencha-extjs-using-viewport-within-a-site-design) which seems to cover my problem.

But I don't use Ext JS components like grids or forms, I just want to display the model data using the data view component and templates.

Can anybody give me a hint?

Thanks in advance!


14 Mar 2011, 5:31 AM
Instead of setting up the viewport to render to document.body, use Ext.get('contents').