次のような Ext JS フォームに複数選択コントロールがあります。
「使用可能」と「選択済み」の 2 つの凡例を変更するにはどうすればよいですか?
ItemSelect.js
これらを内部で一度設定できるファイルに表示されます。
しかし、呼び出しコードからこれらの凡例ラベルを設定して、このコントロールを呼び出すたびに新しい凡例名を付けることができるようにするにはどうすればよいですか?たとえば、次のようなものです。
msConfig[0].legend = 'verfügbar';
msConfig[1].legend = 'ausgewählt';
呼び出しコード:
}, {
xtype: 'itemselector',
name: 'itemselector',
fieldLabel: 'ItemSelector',
width: 700,
imagePath: 'images/multiselect/',
multiselects: [{
width: 250,
height: 200,
store: new Ext.data.ArrayStore({
data: [[123,'One Hundred Twenty Three'],
['1', 'Two'], ['2', 'One'], ['3', 'Three'], ['4', 'Four'], ['5', 'Five'],
['6', 'Six'], ['7', 'Seven'], ['8', 'Eight'], ['9', 'Nine']],
fields: ['value','text'],
sortInfo: {
field: 'value',
direction: 'ASC'
}
}),
displayField: 'text',
valueField: 'value'
},{
width: 250,
height: 200,
store: [['10','Ten'],['11','Eleven'],['12','Twelve']],
tbar:[{
text: 'clear',
handler:function(){
simple_form.getForm().findField('itemselector').reset();
}
}]
}]
},