PDA

View Full Version : Dynamic ButtonGroup Not Loading Displaying In I.E.



azinyama
2 Nov 2012, 11:54 PM
Good day all!!!

I'm loading buttongroups and buttons into a toolbar to create a menu, from records being returned from a store load method. Code below:


Code in controller: After panel is rendered calls 'onRender'


onRender: function()
{
this.desktopWindowMask = this.getDesktopWindow().getEl(); //new Ext.LoadMask(this.getDesktopWindow(), {msg: 'Loading user menu...'});
this.desktopWindowMask.mask('Loading user menu...');//.show();

this.getDesktopStatusBar().setStatus({text: 'Loading user menu...', iconCls: 'x-status-busy'});

Ext.defer(this.loadMenu, 500, this);
},

loadMenu: function()
{
this.getMenuStore().load(
{
params : { user_rowid: this.getDesktopWindow().Users_RowID },
callback: function(records, operation, success)
{
if (success)
{
Ext.each(records, function (rec)
{
if (rec.get('parent_id') === -1)
{
this.getDesktopToolBar().add(
{
xtype : 'buttongroup',
id : rec.get('id'),
title : rec.get('text'),
autoRender : true,
layout : 'table',
defaults : {
scale : 'large',
iconAlign : 'top'
}
});
}
else
{
btngrp = this.getDesktopToolBar().getComponent(rec.get('parent_id'));

btngrp.add(
{
xtype : 'button',
id : rec.get('id'),
text : rec.get('text'),
iconCls : rec.get('iconCls'),
action : rec.get('action'),
tooltip : rec.get('tooltip'),
disabled : rec.get('disabled')
});

btngrp.doComponentLayout();
}
}, this);

// this.getDesktopToolBar().doLayout();

this.desktopWindowMask.mask('Loaded user menu...');

this.getDesktopStatusBar().setStatus({ text: 'Loaded user menu...', iconCls: 'x-status-valid' });

Ext.defer(this.loadDefaults, 80, this);
}
else
{
this.getDesktopStatusBar().setStatus({text: 'An error occurred while loading user menu...', iconCls: 'x-status-custom-error'});

Ext.MessageBox.show(
{
title : 'User Menu Load Error',
msg : operation.getError(),
icon : Ext.MessageBox.ERROR,
buttons : Ext.Msg.OK
});
}
},
scope : this
}, this);
},


The problems that I'm having is that in internet explorer:

buttongroup title is not showing
last button group is not showing

See images below:
FireFox is fine
39789

Internet Explorer is NOT fine
No titles not, 'Help' button group not showing.39790


Secondary problem. My mask 'desktopWindowMask' freezes while the store is loading and adding menu items to the toolbar.

mitchellsimoens
5 Nov 2012, 7:01 AM
I'm assuming you have inspected the records coming in and set some breakpoints to follow your code?

azinyama
5 Nov 2012, 8:02 AM
Thanx for the reply...

I have checked the records and they are fine. Not sure I understand what you mean by
set some breakpoints to follow your code