저장소는 별도 기능으로 bindStore를 사용하여 콤보 상자에 연결됩니다.콤보 상자 및 bindStore에 대한 필터링 저장
모든 매개 변수를 기반으로 해당 함수의 데이터를 필터링해야합니다.
loadMarkers: function(store, value){
store.filter('markerid',17);
this.fields.marker.bindStore(store);
this.fields.marker.setValue(value);
}
이 구체적인 예에는 바인딩 전과 후에 두 가지 diff 방법이 있습니다. 마지막 Console.log는 'store'와 심지어 combobox에 대한 필터링 된 저장소를 보여줍니다. 그러나 콤보 박스 자체는 여전히 모든 것을 보여줍니다.
콤보 상자의 설정 :
marker: new Ext.form.ComboBox({
fieldLabel: _('Marker'),
displayField: 'name',
valueField: 'id',
mode:'local',
lastQuery: '',
store: new Ext.data.JsonStore({
fields: ['name', 'id', 'markerid'],
data: [
{name:_('Default'), id: 0, markerid: 0}
]
})
})
this.markerStore = new Ext.data.JsonStore({
autoLoad: true,
url: 'Api/getMarkers',
root: 'response',
sortInfo: {field: 'name', direction: 'ASC'},
fields: Ext.data.Record.create([
{name: 'id', type: 'integer'},
{name: 'name', type: 'string'},
{name: 'markerid', type: 'integer'}
])
});
당신은 상점 설정이 너무 – Scriptable
당신이 친구를 사용하는 내선의 버전을 저장 설정 –
업데이트 보여줄 수 있을까요? 나는 최소한 – Scriptable