PDA

View Full Version : [CLOSED][3.0RC1] Error in Ext.data.JsonStore



alayasf01
4 May 2009, 4:39 AM
I have many difficulties to provide an example of this error.
Consider this post to Fredric Berling:
https://extjs.com/forum/showthread.php?p=278877

It works perfectly with version 2.2.1 of ext.
Does not work with version 3.0-rc1.1

An example of JSON domino data can be found here:
http://www.codestore.net/fakenames.nsf/85255e01001356a8852554c200753106?readviewentries&outputformat=JSON

thanks

evant
4 May 2009, 4:41 AM
???

More information please.

alayasf01
4 May 2009, 5:43 AM
I use pure ext (not extnd) in a domino.
My Code:




Ext.onReady(function(){
var url = "/test2/test2.nsf/6cb03bfdadfa074ac12573530033df76?ReadViewEntries&outputformat=JSON"
var jsonReader = new Ext.data.JsonReader({
root: 'viewentry',
totalProperty: '@toplevelentries',
id: 'id',
fields: [ {name:'@position', type:'int'},
{name:'unid', mapping:'@unid'},
{name: 'description', mapping: 'entrydata[1].text[0]'}
]
});

var JsonStore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url : url,
method: 'POST'
}),
reader: jsonReader
});

JsonStore.on('beforeload', function() {
JsonStore.proxy.conn.url = url + "&startkey="+cb.getRawValue()
});

var cb= new Ext.form.ComboBox({
displayField : 'description',
valueField : 'description',
loadingText : 'Querying....',
minChars : 1,
triggerAction : 'description',
store : JsonStore,
forceSelection: true,
triggerAction: 'all',
emptyText:'Prodotto...',
selectOnFocus:true,
applyTo: 'ID_FFFFFF', allowBlank: true
});
});


I can not provide a complete test case.
The application is within an intranet
the error is visible here:

evant
4 May 2009, 6:11 AM
Use ext-all-debug when debugging. Do a bit of tracing and see where the error leads.

Condor
4 May 2009, 8:03 AM
Some notes:
1. How does your json data look. Do you really have properties with @ signs in them?
2. No need to set a valueField if it is the same as the displayField.
3. What is this doing here: triggerAction:'description'?

alayasf01
4 May 2009, 8:10 AM
Works !.
I had included "Ext-Base v2.3 adapter extensions".
I have removed and everything works regularly.

Ext-Base 2.3 does not seem to be compatible with ext 3.0

Sorry.