I have a gridpanel where some of the fields are keys for an enum. I want to display the value of the enum, not the key. What I was doing before was, on render, replace the key of the dataindex with the value.
However, what I'm finding is that, when the page is refresh, sometimes the store doesn't load, or doesn't load in time. I'm trying to find a workaround for this, but can't find anything reliable. Is there a way I can tell the controller to wait until the table is fully rendered, then change the value of those columns once the store is loaded?
Code:
header: 'A Column', dataIndex: 'aColumn', flex: 1,
renderer: function(value){
if(value){
var aColumnStore = EJJ.application.getStore('aColumnStore')
return aColumnStore.getById(value).data.desc
}else{
return value
}
}
However, what I'm finding is that, when the page is refresh, sometimes the store doesn't load, or doesn't load in time. I'm trying to find a workaround for this, but can't find anything reliable. Is there a way I can tell the controller to wait until the table is fully rendered, then change the value of those columns once the store is loaded?
This only happens in Chrome. Not in Firefox.
Aucun commentaire:
Enregistrer un commentaire