Ext多选框在数据源加载后全选。

点击已通知人员服务器

从新加载数据源并全选当前列编码

代码以下url

数据源代码:代理

var store = new Ext.data.Store({
				autoLoad : {// 自动加载
					params : {// 属性,至关于能够在action中使用request.getParamet("属性");取值
						start : 0,
						limit : 20,
						departmentcode : orgnum,	//组织编码
						personname : jQuery('#personname').val()	//人员姓名
					}
				}, 
				// 读取服务器端的数据
				reader : new Ext.data.JsonReader({
							totalProperty : "results",// 得到总的记录数量
							root : "items",// 得到数据集合
							// 设置字段(至关于JAVA对象的属性)
							fields : fields
						}),
				// 远程代理,AJAX到服务器端
				proxy : new Ext.data.HttpProxy({
							url : 'caseTask.do?method=getPersonList'
						})
			})
 

从新加载并全选code

//已通知人员查询
	function selectSearchInfos() {
		store.load({
					params : {
						start : 0,
						limit : 20,
						orgnum : orgnumHidden.getValue(),
						personname : search_text.getValue(),
						personid : jQuery('#personid').val(),
						isSelectPerson : "yes",
						caseId : jQuery("#caseId").val()
					},
					// 之后每次load数据时,都会默认选中
					callback: function(records, options, success){
					 	sm.selectRecords(records, true);// 之后每次load数据时,都会默认选中
			      }
					
				});
	}
 
相关文章
相关标签/搜索