Ext.Ajax.request({
url : __ctxPath + "/unim/listAgtUnimAgent.do?Q_ismonitor_L_EQ=0",
method : 'post',
success : function(response) {
var result = Ext.util.JSON.decode(response.responseText);//解析数据
var iCount = result.length;
if(iCount>0) {
//==拼接格式串
var agtList = '[';
for(var i=0;i<iCount;i++) {
agtList = agtList + "{boxLabel: '"+result[i].userName+"', name: '"+result[i].agentId+"',id:'"+result[i].agentId+"'}";
if(i<iCount-1) {
agtList += ",";
}
}
agtList += "]";
//==新建复选框组,将数据填充进去
var
myItemsGroup = new Ext.form.CheckboxGroup({
name:'Unim_AgtMager_ChkGrp_AgtNam',
id:'Unim_AgtMager_ChkGrp_AgtId',
border:false,
name:'items',
columns:4,
items:
eval(agtList
)
});
//==将组件渲染到面板上
addFormPanel.add(myItemsGroup);
addFormPanel.doLayout();
}
},
failure : function() {
Ext.ux.Toast.msg('提示信息', '座席列表加载失败,请联系管理员!');
}
});