Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在extjs中更新托管iframe面板_Extjs - Fatal编程技术网

在extjs中更新托管iframe面板

在extjs中更新托管iframe面板,extjs,Extjs,一个长职位的候选人。这是问题的继续: 在问题中,我有一个网格定义如下: var updater = msgDetailsPanel.getUpdater();/*Added new*/ var detailGrid = new Ext.grid.GridPanel({ id:'detailGrid', store: dataStore, collapsible: false, columnLines: false, enableHdMenu: false, header: false, cm

一个长职位的候选人。这是问题的继续: 在问题中,我有一个网格定义如下:

var updater = msgDetailsPanel.getUpdater();/*Added new*/


var detailGrid = new Ext.grid.GridPanel({
id:'detailGrid',
store: dataStore,
collapsible: false,
columnLines: false,
enableHdMenu: false,
header: false,
cm: new Ext.grid.ColumnModel({
defaults: {
sortable: true
},
{id:'msgId',hidden: true, dataIndex: 'msgId'},                  
{sortable: true, dataIndex: 'deliveryAddr'},
{sortable: true, dataIndex: 'deliveryDate'},
{sortable: true, dataIndex: 'status', renderer:function(value, p, record){
return String.format( '<font color="009966">{0}</font>', value );}},
{header: 'info',xtype: 'templatecolumn',tpl: '<a href="#"  onClick = "alert({msgId})">View Message Details</a>'}  
]
}),
viewConfig: {
forceFit:true
},
columnLines: false,
frame:false,
collapsible: false,
animCollapse: false,
title: alertName,
disableSelection: true,
deferRowRender:false
});
我如何才能做到这一点?

由于您的ID('msgId')是硬编码的,因此我建议使用一种简单的方法:

Ext.onReady( function()
{
    // When the DOM is ready, establish a handler (onClick) for the msgId node.
    // Again, msgId is hardcoded - not certain why you would pass it as a parameter to updater - 
    // but createDelegate passes msgId as a parameter.
    Ext.get('msgId').on( 'click', updater.update.createDelegate( this, [{msgId}], 0 ))
});

我喜欢使用Ext.id创建所有DOM id。本质上,它意味着永远不关心DOM ID的确切值,例如Ext.ID(null,“something”)。这也意味着你的代码永远不会有类似id:'msgId'-一个硬编码的id。
Ext.onReady( function()
{
    // When the DOM is ready, establish a handler (onClick) for the msgId node.
    // Again, msgId is hardcoded - not certain why you would pass it as a parameter to updater - 
    // but createDelegate passes msgId as a parameter.
    Ext.get('msgId').on( 'click', updater.update.createDelegate( this, [{msgId}], 0 ))
});