Hi! I've succeeded in creating a viewport with tree, grids and tabpanels in different regions and with business logic that loads data depending on selections. This is my 'application' part.
So far I had a xds_index.js rendered with the following content:
Ext.onReady(function() {
var myVieport = new MyViewport({
renderTo: Ext.getBody()
});
myViewport.show();
});
From the forums I learned it was possible to add 'main level' objects in a single project. So I wanted to add a login form. Added this in a window MyLoginWindow. When I export the project the following xds_index.js is generated:
Ext.onReady(function() {
var myLoginWindow = new MyLoginWindow({
renderTo: Ext.getBody()
});
myLoginWindow.show();
var myViewport = new MyViewport({
renderTo: Ext.getBody()
});
myViewport.show();
});
This will make both visible. Of course I'd want only the login window to show up and when a successful login is made, the 'application' MyViewport would be shown.
Now I edit the xds_index.js erase and move the show command into the MyLoginWindow.js which is the correct place for custom code. It works but I have to remember to remove the show command from the generated file every time i export.
Is there a way to prevent the show command to be generated for each 'main level' object? Or, are there any issues with the way I try to work this out?
We're considering making it a toggle/option for both instantiating 'top level' components and showing them...individual components of course. However in the meantime, I recommend making copies of the xds_index.js and xds_index.html files (and change the reference to xds_index.js's copy accordingly), so that you can alter them without them being overwritten upon subsequent exports.