View Full Version : Combo Box on form load, with remote json store and pagination

26 Sep 2011, 1:45 AM
I have this combo box that i need to display the display field when the form is loading.
right now, I'm successfully loaded the form, but it's display the value field sometimes. I learn that this is due to the data in the store.

If i enter a data that is on the first page in the store, it load the display value. but if I entered value that is not on the first page it didn't show the display field but value field.

it's like the store didn't reload when the form load.

here is some relevant code i think

render: function() {
var pemeriksaan_id = this.findParentByType('PemeriksaanWindow').pemeriksaan_id;

url: 'jsp/rencana_pemeriksaan/show_action.jsp',
params: {id: pemeriksaan_id}


and the combobox ui

InputPegawaiPanelUi = Ext.extend(Ext.form.ComboBox, {
displayField: 'nama',
typeAhead: false,
loadingText: 'Searching...',
pageSize: 10,
anchor: '100%',
minChars: 1,
valueField: 'nip',
forceSelection: true,
initComponent: function() {

and the combo js

InputPegawaiPanel = Ext.extend(InputPegawaiPanelUi, {
initComponent: function() {

this.store = new Ext.data.JsonStore({
root: 'data',
totalProperty: 'total',
url: 'jsp/pegawai/list_load.jsp',
autoLoad: false,
fields: [
name: 'nip'
name: 'nama'
searchBtnClickHandler: function(btn, e) {

Ext.reg('inputPegawaiPanel', InputPegawaiPanel);

is there any simple way to make the combo reload with the value field as the parameter, or should I do this manualy when loading the form ?