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數據時,都會默認選中
			      }
					
				});
	}
 
相關文章
相關標籤/搜索