PDA

View Full Version : build for production



eladc
22 Nov 2012, 4:52 AM
Is there a way to create a couple of views in app.js?

I have a site that build in html and i want to add Sencha into it. for examle I added three grids to a page,
every grid is rendered into a different div by it's id. If my app.js looks like this:




Ext.Loader.setConfig({
enabled: true,
disableCaching: true
});




Ext.Loader.setPath('Example', 'app');
Ext.Loader.require('Example.view.FirstTable');
Ext.Loader.require('Example.view.SecondTable');
Ext.Loader.require('Example.view.ThirdTable');
Ext.application({

name: 'Example',
controllers: ['ExampleController'],

launch: function(){
Ext.create('Example.view.FirstTable');
Ext.create('Example.view.SecondTable');
Ext.create('Example.view.ThirdTable');
}
});

Only the first table appear after i build it for production. When i work in development mode every thing is alright.

Is it possible to do this?

mitchellsimoens
24 Nov 2012, 6:29 AM
Just looking at the code provided shouldn't be an issue at all.