虽然我知道这玩意很强大,但是还是喜欢jquery,当你翻遍ext文档都找不到原因时候,你觉得ext 真坑。至少jquery自己写,出了问题,知道在哪。
今天就遇到一个棘手的问题,
场景是:一个form,items是一个combox,这个combox(更准确是,combogird,就是那种下拉表格,带code和desc的)是循环出来的,他的行数不固定。比如为选择用户吧。需求是,可以在combogrid里面输入,再根据输入的过滤出来相近的。
这个store也相应的是在循环里,想在store listeners:{'beforeload':把该store对应的输入的值拿到去后台查询},但是就是拿不到。。。,通过ext.getCmp(动态id),id值是'item_'+i,i就是循环的变量了,但如果我把id写死,ext.getCmp('item_0')就是可以的。
这是Ext的 bug嘛??????
类似
大概就是这样,始终Ext.getCmp为空。。。。。换'item_'+i 为 item_0 或者 item_1。。都可以的。。
ext bug 吗??????
今天就遇到一个棘手的问题,
场景是:一个form,items是一个combox,这个combox(更准确是,combogird,就是那种下拉表格,带code和desc的)是循环出来的,他的行数不固定。比如为选择用户吧。需求是,可以在combogrid里面输入,再根据输入的过滤出来相近的。
这个store也相应的是在循环里,想在store listeners:{'beforeload':把该store对应的输入的值拿到去后台查询},但是就是拿不到。。。,通过ext.getCmp(动态id),id值是'item_'+i,i就是循环的变量了,但如果我把id写死,ext.getCmp('item_0')就是可以的。
这是Ext的 bug嘛??????
类似
for(var i=0...){
var store={
...
listeners:{
'beforeload':function(){
store.proxy.extraParams:{code:Ext.getCmp('item_'+i).getValue()}
....
}
}
}
var item = Ext.create('combo',{
....
id:'item_'+i
...
})
}
}
大概就是这样,始终Ext.getCmp为空。。。。。换'item_'+i 为 item_0 或者 item_1。。都可以的。。
ext bug 吗??????