PHP*_*Pst 2 javascript syntax function extjs4
这行js代码的含义是:
('selectionchange',function(sm, rs) {
if (rs.length) {
var detailPanel = Ext.getCmp('detailPanel');
bookTpl.overwrite(detailPanel.body, rs[0].data);
}
})
Run Code Online (Sandbox Code Playgroud)
这是以下链接的一部分:http: //dev.sencha.com/deploy/ext-4.0.2a/examples/grid/binding-with-classes.js
更新:我删除了这些行和代码运行没有任何diffrenece!这是一个编码错误谢谢大家
我会走出困境并称之为编辑错误.这是一个更多的背景:
initEvents: function() {
// call the superclass's initEvents implementation
this.callParent();
// now add application specific events
// notice we use the selectionmodel's rowselect event rather
// than a click event from the grid to provide key navigation
// as well as mouse navigation
var bookGridSm = this.getComponent('gridPanel').getSelectionModel();
('selectionchange', function(sm, rs) {
if (rs.length) {
var detailPanel = Ext.getCmp('detailPanel');
bookTpl.overwrite(detailPanel.body, rs[0].data);
}
})
bookGridSm.on('selectionchange', this.onRowSelect, this);
},
Run Code Online (Sandbox Code Playgroud)
这是bookTpl整个文件中唯一提到的.有人将似乎是事件绑定的东西复制到他们的粘贴缓冲区中并意外地将其粘贴到此文件中,或者他们故意将其粘贴到该文件中以检查bookGridSm.on调用的语法并忘记自行清理.
查找示例的勘误列表.
| 归档时间: |
|
| 查看次数: |
122 次 |
| 最近记录: |