小弟刚学extjs,这段代码看不懂,请各位高手帮忙解释一下,谢谢

问题描述

Ext.BLANK_IMAGE_URL='../../ExtJS/resources/images/default/s.gif';Ext.QuickTips.init();Ext.override(Ext.form.ComboBox,{onKeyUp:function(e){if(this.editable!==false&&!e.isSpecialKey()){if(!this.isExpanded()){//this.onTriggerClick();//this.selectText(this.getRawValue().length,this//.getRawValue().length);}this.store.removeAll();if(this.id=="customer_name"){this.store.reload({params:{customer_name:this.getRawValue()}})}elseif(this.id=="customer_code"){this.store.reload({params:{customer_code:this.getRawValue()}})}elseif(this.id=="product_name"){if(Ext.get("customer.customer_id").dom.value!=""){this.store.reload({params:{customerId:Ext.get("customer.customer_id").dom.value,productName:this.getRawValue()}})}}elseif(this.id=="product_number"){if(Ext.get("customer.customer_id").dom.value!=""){this.store.reload({params:{customerId:Ext.get("customer.customer_id").dom.value,productNumber:this.getRawValue()}})}}varindex=this.store.find(this.displayField,this.getRawValue());if(index!==-1){//this.select(this.store.getCount()-1);//this.select(index,true);}else{//this.select(0,true);//this.setValue(this.getRawValue());}}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=newExt.KeyNav(this.el,{"up":function(e){this.inKeyMode=true;this.selectPrev();},"down":function(e){if(!this.isExpanded()){this.onTriggerClick();}else{this.inKeyMode=true;this.selectNext();}},"enter":function(e){this.onViewClick();this.delayedCheck=true;this.unsetDelayCheck.defer(10,this);},"esc":function(e){this.collapse();},"tab":function(e){this.collapse();//this.onViewClick(false);returntrue;},scope:this,doRelay:function(foo,bar,hname){if(hname=='down'||this.scope.isExpanded()){returnExt.KeyNav.prototype.doRelay.apply(this,arguments);}returntrue;},forceKeyDown:true});this.queryDelay=Math.max(this.queryDelay||10,this.mode=='local'?10:250);this.dqTask=newExt.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=newExt.util.DelayedTask(this.onTypeAhead,this);}if(this.editable!==false){this.el.on("keyup",this.onKeyUp,this);}if(this.forceSelection){this.on('blur',this.doForce,this);}}});

解决方案

解决方案二:
看了看,觉得这个写的好复杂啊,跟EXT的源代码有的一拼,能看懂一小部分,这个是对下拉框的一系列设置操作,包括收缩和展开的时候。
解决方案三:
说实在的,没看懂
解决方案四:
重写了extjs的combobox当在不同地方new这个combobox的时候,根据自身的id不同加载不同的数据,然后定义了一些键盘事件来快速操作这个combobox
解决方案五:
引用3楼dataminer_2007的回复:

重写了extjs的combobox当在不同地方new这个combobox的时候,根据自身的id不同加载不同的数据,然后定义了一些键盘事件来快速操作这个combobox

高手啊。学习。
解决方案六:
该回复于2011-04-01 14:35:12被版主删除
解决方案七:
就是从写了Ext.form.ComboBox中一些事件的处理方法
解决方案八:
基本上弄懂了大概,这是我同事写的,牛的很啊

时间: 2024-08-01 20:49:51

小弟刚学extjs,这段代码看不懂,请各位高手帮忙解释一下,谢谢的相关文章

java web-这段代码看不懂啊,求解释

问题描述 这段代码看不懂啊,求解释 /s:iterator /s:iterator/sx:treenode/s:iterator </sx:treenode> </s:iterator> </sx:treenode> </s:iterator> 解决方案 <sx:tree label="%{#request.project.projectName}" id="parentId" > //项目名 <s:

瞅瞅 这段代码看不懂

问题描述 <th>转        诊</th><td><asp:RadioButtonListID="radlZHUANZHEN"runat="server"RepeatDirection="Horizontal"RepeatLayout="Flow"CssClass="easyui-validatebox"validtype="ctrl[['custo

c c++编程-有没有大神看下 ,小弟刚学c++这个代码运行后输出str不是输出100为什么

问题描述 有没有大神看下 ,小弟刚学c++这个代码运行后输出str不是输出100为什么 #include #include using namespace std; int main(void) { char *str = new char[100]; strcpy(str,"hello imooc"); cout << "*str"; delete[] str; system("pause"); return 0; } 解决方案 如

小弟刚学完java js servlet jsp推荐个项目视频

问题描述 小弟刚学完javajsservletjsp这些基础的,想做个简单的项目,推荐个网上比较好的项目视频,越详细越实际越好.一步一步,小弟现在对一个项目该怎么入手没有一点头绪 解决方案 解决方案二:该回复于2009-10-13 09:05:38被版主删除解决方案三:ssh我还没学,所以推荐的项目里面尽量先别涉及这方面的~~下一步要学习的东西解决方案四:可以看下v512工作室的web开发以留言板为例讲解的电驴上就有下载

spark-一小段scala代码看不懂?

问题描述 一小段scala代码看不懂? def collect(): Array[T] = withScope { val results = sc.runJob(this, (iter: Iterator[T]) => iter.toArray) Array.concat(results: _*) } 里面的results是个数组Tuple3[n][] 问下Array.concat(results: _*)是什么意思啊?? 我想自己初始化一个Tuple3[n][],但是我不会初始化这个东西啊.

spark1.2里的一小段scala代码看不懂

问题描述 spark1.2里的一小段scala代码看不懂 def map [ U : ClassTag ] ( f : T => U): RDD[U] = { val cleanF = sc.clean(f) new MapPartitionsRDD [ U , T ] ( this , ( context , pid , iter ) => iter.map(cleanF)) } RDD.scala里的这个方法里的context, pid, iter不知道从哪来的啊?? https://gi

C#初学者 代码看不懂,求大神,用了DBhelper之后两段代码是怎么实现的

问题描述 C#初学者 代码看不懂,求大神,用了DBhelper之后两段代码是怎么实现的 //修改学院信息 private void btnupdate_Click(object sender, EventArgs e) { int index = dgvcollege.CurrentRow.Index; //取得选中行的索引 CollId = dgvcollege.Rows[index].Cells["CollegeId"].Value.ToString(); CollName = d

新手-求SSH的书,小弟刚学完JSP,想学一下SSH,大家有什么书推荐吗?

问题描述 求SSH的书,小弟刚学完JSP,想学一下SSH,大家有什么书推荐吗? 如题,刚学完JSP,想学SSH框架,大家有什么相关的推荐吗?望不吝赐教,不胜感激 解决方案 轻量级Java EE企业应用实战:Struts 2+Spring+Hibernate整合开发,他主要讲的是SSH的 解决方案二: 李刚的书讲的还不错,百度一下吧

numpy-大家谁能看懂这段代码?python数据分析的,求赐教!谢谢

问题描述 大家谁能看懂这段代码?python数据分析的,求赐教!谢谢 1.lines = [line.split('t') for line in open('路径/a.txt')] 2.# file colums 3.num=len(lines[0]) 4.# file rows 5.n=len(lines) 6.df = [[float(x) for x in line] for line in lines[1:]] 7.result=[] 8.import numpy 9.npdata=n