Javascript ext.js关联未及时完成加载
我在成本中心和网站模型之间建立了关联 我的问题是,当我尝试在CostCenterGrid中显示站点时,关联没有及时加载Javascript ext.js关联未及时完成加载,javascript,extjs,associations,Javascript,Extjs,Associations,我在成本中心和网站模型之间建立了关联 我的问题是,当我尝试在CostCenterGrid中显示站点时,关联没有及时加载 items: [ { xtype: 'gridpanel', itemId: 'CostCenterGrid', columns: [ { text: MR.locale.Name, dataIndex: 'Name',
items: [
{
xtype: 'gridpanel',
itemId: 'CostCenterGrid',
columns: [
{
text: MR.locale.Name,
dataIndex: 'Name',
renderer: function(translation) {
return translation.get('ActualTranslation');
},
width: 150
}, {
text: MR.locale.Site,
dataIndex: 'Site',
renderer: function(value, meta, record) {
return record.getSite().get('ActualName');
},
width: 150
},
],
store: 'MR.store.administration.CostCenter',
}
正如您所看到的,我有一个站点属性的自定义渲染器。第一次渲染网格时,该站点未显示。再次运行时,站点将正确可见
如何克服这个问题?通常当您在第二次加载时遇到这种异常情况时,它可能与异步进程有关。 我认为您的记录对象最初没有准备好或为空。
确保在渲染数据之前获取数据。是的,我知道数据是异步加载的。我想知道如何在渲染网格之前等待加载所有存储。