foobarr
4 Jan 2012, 5:30 AM
I have an Ext4 application (using the MVC pattern), that asks common code to inject some DOM elements. The following is an outline of the code:
Ext.application({
// namespace, appFolder, controllers, etc....
launch: function() {
var vp = Ext.create('Ext.container.Viewport', {
suspendLayout : true,
items : [
{
xtype : 'form',
id : 'parent_ID',
items : []
},
// other Ext4 components created ....
],
});
new CommonCodeButton ({
// common code gets the parent DOM element and appendsChildren.
parentElementId : 'parent_ID',
// other properties ...
});
vp.suspendLayout = false;
vp.doLayout();
}, /* end launch() */
});
The injected elements are displayed, but the parent (Viewport) widget does not manage the geometry of the injected elements properly. If I edit the css properties after the initial render, the parent does not change accordingly.
So...am I missing something? Is there a way to get the parent to respond to changes to injected-children DOM geometry? Or does the Ext4 MVC pattern preclude this kind of DOM manipulation?
btw: we have (Ext3x code) that does this kind of DOM manipulation successfully.
Thanks in advance.
Ext.application({
// namespace, appFolder, controllers, etc....
launch: function() {
var vp = Ext.create('Ext.container.Viewport', {
suspendLayout : true,
items : [
{
xtype : 'form',
id : 'parent_ID',
items : []
},
// other Ext4 components created ....
],
});
new CommonCodeButton ({
// common code gets the parent DOM element and appendsChildren.
parentElementId : 'parent_ID',
// other properties ...
});
vp.suspendLayout = false;
vp.doLayout();
}, /* end launch() */
});
The injected elements are displayed, but the parent (Viewport) widget does not manage the geometry of the injected elements properly. If I edit the css properties after the initial render, the parent does not change accordingly.
So...am I missing something? Is there a way to get the parent to respond to changes to injected-children DOM geometry? Or does the Ext4 MVC pattern preclude this kind of DOM manipulation?
btw: we have (Ext3x code) that does this kind of DOM manipulation successfully.
Thanks in advance.