PDA

View Full Version : Problem with Form.load()



Achim74
28 Sep 2009, 1:54 PM
Hi !
I have a problem with form.load. I cannot access all fields that are returned from the remote server.



{"success":true,"data":[{"id":"1","name":"TEST","inhalt_code":"Hallo people","inhalt_datei":"","paket_config":"","news":"","default_code":"Hallo Leute","default_datei":"","aktiv":"0","nix":"1","notizen":"Test"}]


here is the form:



Ext.extend(RegioAssignWindow, Ext.Window, {
loadRegioAssign: function(id) {
RegioAssignWindow.setTitle('<?= $t->_("Assign profile"); ?>');
RegioAssignWindow.show();
regioassignForm.getForm().load({
url: 'element/load?id='+id,
waitMsg: '<?= $t->_("Loading"); ?>',
waitTitle: '<?= $t->_("Please wait"); ?>...',
failure: function(form, action){
Ext.Msg.alert('<?= $t->_("Error"); ?>', '<?= $t->_("Error"); ?>: '+action.failureType);
},
success: function(form, action){
console.debug("Data Property:"+action.result.data.nix);

Ext.getCmp('lovcombo').setValue(action.result.data.nix);
}
});
}
});


As you can see I try to dump the variable "nix". Which returns undefined. The fields id, name, aktiv, notizen are working ... whats wrong ??? I dont get it.

Thank you for your help

Achim74
28 Sep 2009, 2:01 PM
Sorry forgot to define the field in the record. SOLVED !