Before I get to my proper question perhaps a bit of overview of what I'm trying to achieve...
Ideally I want to try and get to a position where I can provide a framework for our web UI's where a lot of the complexity of the Ext stuff is hidden from those at the coal face.
The general thinking is to provide generic view classes that provide common page layouts that we use.
For example, all of our pages have a header, then a main content panel, so this indicates to me a common viewport that sorts out the header, and a takes a panel as the main content.
This content panel may then be a two pane layout, with a grid on top and a details pane below.
It could be a tree on the left, then a grid and detail pane on the right, again with a horizontal split. Sure you get the idea...
A developer then only has to say what page style then need, and provide the top & bottom panel implementation, say.
Obviously there's some thought still needed for handling events between panes, but sure that's solvable by making the content styles more focused...
Anyway, the question I have stems from the fact I'm not exactly sure how layouts work I think... I've always found the process of laying out components, and panels especially, to be a little hit and miss, a try it and see what happens type approach.
From what I can see from playing about with some ideas, if a panel class is actually created using Ext.create before it is displayed (i.e. for putting into a config object), then a fit layout essentially does nothing.
I'd want fit layout for the panel below the header you see.
This is before we even get to the real content...
Does this mean I cannot actually create panels at construction or initComponent time?
Do I have to define my panels as JSON with xtypes so they're created later (I think that's what that does at leaset)?
If supposed to use xtypes, where has Ext.register gone? Has it been replaced with something else, or is that no longer the approach to take?
Do I have to kick panels after creation somehow so that the layout works (have tried doLayout, but probably in the wrong place)? Perhap in a render event or something?
Sorry for the barrage of questions, I'd just like to understand how it works, and what the approach to take should be.
Apologies if I've not explained myself very well either. Feel free to ask questions if needed.
I look forward to any insights you may have.