Hello everyone, i have a problem to reload data for combobox,
my combobox use json data and I have a list of combobox, only the first combobox load data at the first time, the others will load datas after selecting the first combobox,
my code is like this:
//------------define combobox class----------------- Planet SoC:: part of the data query as well as be able to reload the users selection later that it would be better to use Combo box rather than the Radio buttons as that http://planet-soc.com/planet?page=84HOME |
Application.Combo = Ext.extend(Ext.form.ComboBox, {
border:false
,initComponent:function() {
Ext.apply(this, {
typeAhead: true,
//mode: 'local',
triggerAction: 'all',
selectOnFocus:true,
width:100
});
Application.Combo.superclass.initComponent.apply(t his, arguments);
}
,onRender:function() {
Application.Combo.superclass.onRender.apply(this, arguments);
}
});
Ext.reg('Combo', Application.Combo);
// -----------the first combobox----------------
//------------myComboRelease-----------------
var releasestore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: './php/backend.php', Dynamic comboBox and listgrid operations | Backbase Developer Network:: How to gather that data from listGrid? bb.command.load and reload the entire page. An html select is shown over a modal window http://bdn.backbase.com/node/5167HOME | List Pro 3 Fixed Problems - Technical Support - FarPoint Technologies:: with a simple style combo box control when saving and reloading the project. Only one columns data displays in the edit field now when you use the http://www.fpoint.com/support/problems/list3.aspxHOME |
method: 'POST'
}),
baseParams:{task: "showRelease"},
reader: new Ext.data.JsonReader({
root: 'release'
}, [
{name: 'appli', mapping : 'Appli'},
{name: 'release', mapping : 'IdRelease'}
])
});
var myComboRelease = new Application.Combo(
{
store: releasestore,
displayField:'release',
fieldLabel:'Release',
emptyText:'Release'
}
);
// -----------after select reload data for other combobox----------------
myComboRelease.addListener('select', changeSys);
function changeSys() {
//alert('cp1');
var release = myComboRelease.getValue();
if(release!=''){
applistore.reload({params: {
release: release
}});
teamstore.load({params: {
release: release
}});
myComboTester.store.reload({params: {
release: release
}});
}
}
//------------myComboAppli-----------------
var applistore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: './php/backend.php',
method: 'POST'
}),
baseParams:{task: "showAppli"
},
reader: new Ext.data.JsonReader({
root: 'appli'
//root: 'results',
//totalProperty: 'total'
}, [
{name: 'appli', mapping : 'application'}
//{name: 'appli', mapping : 'Appli'}
])
});
var myComboAppli = new Application.Combo(
{
store: applistore,
displayField:'appli',
fieldLabel:'Application',
emptyText:'Application'
}
);
the problem is after selecting the first combobox, the others have nothing in them, but i check the response from sever, there are datas come back,
post:
release RP5taskshowAppli
response:
{"appli":[{"application":"Eole"},{"application":"Gate"}]}
but when i click other combobox, if it's the first time click, there is nothing,
but the seconde time there will load datas, so where is my problem, how can i set
the combobox? thanks
Red Hat's Rough Recovery From CFO Exit
Windows Live Finds a New, Pre-installed Home
|