PDA

View Full Version : Problem when load form data.



pimo
2 Feb 2011, 1:07 PM
Hi People.

i would like load a form data using a Ext.Ajax.request, also i Kwon forma has a method load used to load data, i have used this and word fine, but when i use Ext.Ajax.request only datefield dont load its values.

i use this to load form data, this code is in a abstrac panelm with its reader component.



Ext.Ajax.request({
waitMsg: 'Buscando Información..'
, url: this.ownerModule.app.connection
, params: {
method: 'LoadDataAllExp'
, moduleId: this.ownerModule.id
, key_table_value: this.ownerModule.key_table_value
, target:'FORM'
}
, success:function(response, options) {
var r = Ext.util.JSON.decode(response.responseText);
if(r.success){
this.showMessage(this.msgTitle,"Registro Cargado");
}
else{
this.showError(this.msgTitle,"Error al Cargar Registro");

}
console.log('response',response);
console.log('options',options);
//console.log('data',Ext.encode(r.data));
//data.push(Ext.encode(r.data));

var opera = new Object();
opera['id_operacion'] = "";
opera['data'] = r.data;
console.log('opera',opera);
this.getForm().loadRecord(opera);
}
, scope: this
});


Can someone tell me what i doing grong.