PDA

View Full Version : Little problem combo box store



vaucer
14 Feb 2010, 1:56 PM
Hello,

I don't understand, i can't load simple store into a combobox.

I have one simple store with xmlReader:

var storeRelance = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'php/edit.php',
method: 'POST'
}),

reader: new Ext.data.XmlReader({
record: 'response',
id: 'idr'},
['idr' , 'relance'])
});And a simple combobox into a formpanel:

{
xtype: 'combo',
id: 'RelanceEff',
fieldLabel: 'Relances effectuées',
store: storeRelance,
displayField:'relance',
typeAhead: true,
mode: 'local',
forceSelection: true,
disabled: false,
triggerAction: 'all',
selectOnFocus:true,
anchor:'100%'
}Then i wan't just load the store for populate the combox with:


var relance = Ext.getCmp('RelanceEff');
relance.clearValue();
relance.store.reload({params: {task:"GETREL",id:Ext.getCmp('Identifiant').getValue()}});(load or reload never work)

I see in FireBug that the response is well returned after execution of my file edit.php but combobox is never populate.

Thank you very much for your help

vaucer
14 Feb 2010, 2:30 PM
It's partially solved sorry =;

In fact it's my value who seem to be not compatible for display in combobox.

I select datetime field value (00000-00-00 00:00) from database mysql.