var dsform = new Ext.data.ArrayStore({
data: [[123, 'One Hundred Twenty Three'],
['1', '今天星期一'], ['2', '2014.12.29'], ['3', '9.25'], ['4', '北京'], ['5', '肖村桥'],
['6', '成换成'], ['7', '35号'], ['8', '4层'], ['9', '6666']],
fields: ['value', 'text'],
sortInfo: {
field: 'value',
direction: 'ASC'
}
});
var dsto = new Ext.data.ArrayStore({
fields: ['value', 'text']
});
var isItemSelectorForm = new Ext.form.FormPanel({
title: 'ItemSelector',
id: 'isItemSelector',
width: 700,
bodyStyle: 'padding:10px;',
items: [{
xtype: 'itemselector',
name: 'itemselector',
fieldLabel: 'ItemSelector',
imagePath: '/Common/ExtJs/ux/images/',
multiselects: [{
width: 180,
height: 200,
store: dsform,
displayField: 'text',
valueField: 'value'
}, {
width: 150,
height: 200,
store: dsto,
displayField: 'text',
valueField: 'value',
tbar: [{
text: '清除选择项目',
handler: function () {
isItemSelectorFormForm.getForm().findField('itemselector').reset();
}
}]
}
]
}],
buttons: [{
text: 'Save',
handler: function () {
if (isForm.getForm().isValid()) {
Ext.Msg.alert('Submitted Values', 'The following will be sent to the server: <br />' +
isItemSelectorFormForm.getForm().getValues(true));
}
}
}]
});