PDA

View Full Version : Dynamic columns in extjs Portal Example



shaheer912
21 Sep 2013, 11:16 PM
Dynamic columns in extjs Portal Example.

I want to insert columns dynamically in extjs portal example -- specifically i would like to nest them, the problem is i am able to add the columns dynamically but cant drop a portlet inside it, however if i nest columns manually (i.e if they are there already and not defined on runtime) then everything works fine i.e i am able to drop the portlets inside it.

Can anyone help?

basic declaration:



Ext.define('Ext.app.Portal', {
id: 'parentPortal',
extend: 'Ext.container.Viewport',
requires: ['Ext.app.PortalPanel', 'Ext.app.PortalColumn', 'Ext.app.GridPortlet', 'Ext.app.ChartPortlet'],
initComponent: function () {
items: [{
xtype: 'portalpanel',
id: 'threecolumn',
region: 'center',
items: [{
id: 'col-1',
width: 200,
childAnchor: '50% 50%',
items: [{
xtype: 'portalpanel',
items: [{
id: 'col-4',
minHeight: 200
}

],
}]
}, {
id: 'col-2',
items: [{
xtype: 'portalpanel',
items: [{
id: 'col-5',
minHeight: 200
}

],
}]
}, {
id: 'col-3'
}]
}]
}
}


dynamic column:



Ext.create('Ext.app.PortalPanel', {
xtype: 'portalpanel',
});
}

Gary Schlosberg
8 Oct 2013, 11:08 AM
I can't see what the problem is from what you posted, but I wrapped your code between CODE tags, which can improve readability for others. You might also try posting a working sample.

ettavolt
10 Oct 2013, 12:46 AM
I don't remember details of portlet example, but I believe your runtime columns do not have DropZone attached or parent's DropZone is not enough 'dynamic'.