kerocs
8 Sep 2009, 2:39 PM
I was playing with the Troy Reimer Classes which are available at openNTF.org.
I've created an agent which provides the JSON for a view build with this class.
With the url runthisagent?openAgent I receive
{"147BA7574A82CB83C12572EA00748415":{"ChildCount":0,"ColumnIndentLevel":0,"DescendantCount":0,"IndentLevel":0,"IsCategory":false,"IsConflict":false,"IsDocument":true,"IsTotal":false,"IsValid":true,"NoteID":"946","SiblingCount":2,"UniversalID":"147BA7574A82CB83C12572EA00748415","ColumnValues":{"0":"Basketschool"}},"1E17EE58EB3831E8C1257300004AE533":{"ChildCount":0,"ColumnIndentLevel":0,"DescendantCount":0,"IndentLevel":0,"IsCategory":false,"IsConflict":false,"IsDocument":true,"IsTotal":false,"IsValid":true,"NoteID":"A12","SiblingCount":2,"UniversalID":"1E17EE58EB3831E8C1257300004AE533","ColumnValues":{"0":"Basketschool"}}}
This is basically an array of two notes documents.
I'm trying to get this loaded into my jsonstore but I don't know how to map the fields.
Is a root mandatory ?
How do I read the values in the notesdocs ?
var store = new Ext.data.JsonStore({
root: '??????',
fields: [
{name: 'title',mapping : '?????????'}
],
// load using script tags for cross domain, if the data in on the same domain as
// this page, an HttpProxy would be better
proxy: new Ext.data.ScriptTagProxy({
url: 'http://xxx.com/xxxx.nsf/GenerateJSON?openAgent'
})
});
I've created an agent which provides the JSON for a view build with this class.
With the url runthisagent?openAgent I receive
{"147BA7574A82CB83C12572EA00748415":{"ChildCount":0,"ColumnIndentLevel":0,"DescendantCount":0,"IndentLevel":0,"IsCategory":false,"IsConflict":false,"IsDocument":true,"IsTotal":false,"IsValid":true,"NoteID":"946","SiblingCount":2,"UniversalID":"147BA7574A82CB83C12572EA00748415","ColumnValues":{"0":"Basketschool"}},"1E17EE58EB3831E8C1257300004AE533":{"ChildCount":0,"ColumnIndentLevel":0,"DescendantCount":0,"IndentLevel":0,"IsCategory":false,"IsConflict":false,"IsDocument":true,"IsTotal":false,"IsValid":true,"NoteID":"A12","SiblingCount":2,"UniversalID":"1E17EE58EB3831E8C1257300004AE533","ColumnValues":{"0":"Basketschool"}}}
This is basically an array of two notes documents.
I'm trying to get this loaded into my jsonstore but I don't know how to map the fields.
Is a root mandatory ?
How do I read the values in the notesdocs ?
var store = new Ext.data.JsonStore({
root: '??????',
fields: [
{name: 'title',mapping : '?????????'}
],
// load using script tags for cross domain, if the data in on the same domain as
// this page, an HttpProxy would be better
proxy: new Ext.data.ScriptTagProxy({
url: 'http://xxx.com/xxxx.nsf/GenerateJSON?openAgent'
})
});