View Full Version : Error when load combo in remote mode

13 Jan 2011, 11:37 AM
I need a combobox in remote mode, but i get an error about "Record" object.
My code is:

var store = new Ext.data.JsonStore({
storeId: 'getBuscaFabricaProducto',
autoload: 'false',
url: 'http://localhost/prueba/BuscaFabricaProducto'

The error is in the line number 25421 in ext-all-debug.js file:

var s = this.meta, Record = this.recordType,
f = Record.prototype.fields, fi = f.items, fl = f.length, v;

My json data is:

{ "id":"tramaJSON",
"metadata":{ "idProperty":"id",
"fields":[ {"name":"CODIGO_MONEDA","mapping":"CODIGO_MONEDA","size":2,"header":"CODIGO_MONEDA"},

Some idea ?, please help.

13 Jan 2011, 12:03 PM
Just from a quick look at the "Automatic configuration using metaData" section in JsonReader (http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.JsonReader), are you sure that your JSON is correct?

Remove the quotes from around "metadata", and, also, I think from "True" in "success":

13 Jan 2011, 12:47 PM
I try it, without quotes on metadata.
And "metadata" change for "metaData" with "D".

My json-lib for java generate all json with quotes.

Greetings and Thank you,