PDA

View Full Version : Panel Items not showing



jt1088
30 Nov 2010, 8:40 AM
I'm fairly new to ExtJs - so, I'm sure I'm overlooking something simple.

I'm adding a new tab to a tab panel programmatically, and the tool bar displays ok, but the components listed in 'items' are not showing. Looks like the div content is rendered though.

I've been using Ext Designer to generate most of the ExtJS code.

Here is the generated code for the panel:


ClaimsPanelUi = Ext.extend(Ext.Panel, {
title: 'Claims',
closable: true,
layout: 'fit',
initComponent: function() {
this.tbar = {
xtype: 'toolbar',
id: 'claimsToolBar',
items: [
{
xtype: 'button',
text: 'Post Claim'
},
{
xtype: 'button',
text: 'View Check Image'
}
]
};
this.items = [
{
xtype: 'panel',
title: 'ccc',
height: 50,
layout: 'fit',
id: 'claimsInfoHeader'
},
{
xtype: 'claimServiceGrid'
},
{
xtype: 'tabpanel',
activeTab: 0,
id: 'pateientSearchTabPanel',
items: [
{
xtype: 'patientSearchPanel'
}
]
}
];
ClaimsPanelUi.superclass.initComponent.call(this);
}
});

And the code I wrote:


var newPanel = new ClaimsPanel();
// get tab window
var eobTabPanel = Ext.getCmp('eobTabPanel');

// add to window
var newTab = eobTabPanel.add(newPanel);

newPanel.doLayout();
eobTabPanel.doLayout();

eobTabPanel.setActiveTab(newTab);

Thanks in advance! JT

Condor
30 Nov 2010, 8:47 AM
"newPanel.doLayout()" isn't required, but you should add "layoutOnTabChange:true" to the tabpanel.

jt1088
30 Nov 2010, 8:54 AM
Thanks for the quick response. Made the tweaks you suggested, but no luck. FYI, below is the tab panel


EOBTabPanelUi = Ext.extend(Ext.TabPanel, {
activeTab: 0,
layoutOnTabChange: true,
id: 'eobTabPanel',
initComponent: function() {
this.items = [
{
xtype: 'panel',
title: 'EOB Claims',
itemId: 0,
items: [
{
xtype: 'eobgrid'
}
]
}
];
EOBTabPanelUi.superclass.initComponent.call(this);
}
});

jt1088
30 Nov 2010, 9:07 AM
fyi - here's a link to screen caps. One from the browser of what is getting rendered & one from Ext Designer - of what I'd like to see! lol

http://picasaweb.google.com/fly.yamaha/WebSamples?authkey=Gv1sRgCLy7v-jG2Oa4mgE&feat=directlink