PDA

View Full Version : JsonStore not loading



srsi
16 May 2013, 11:47 PM
Can somebody help me out here with JsonStore:

I have a listview with JsonStore and I get the data by doing following:

this.getComponent('resultGrid').getStore().load({
params : this.getValues(),
callback : function (r, o, s) {
debugger;
},
scope : this
});
my callback function says s = false. When I put a debugger in callback and observe this.getComponent('resultGrid').getStore().reader.jsonData, my data is available here but the data is not loading.

FYI: Data from the Spring controller contains complex object. example below:

Student.java

String id;
String name;
Details details;

Details.java
String detailName;
String detailAuthor;
List<Book> bookList = new ArrayList<Book>;

When I have not added List<Book> bookList = new ArrayList<Book>; it was working fine. but when I added this collection it is not loading.

Somebody please help on how to handle these kind of complex object within the JsonStore.

mitchellsimoens
20 May 2013, 5:25 AM
Was the request loaded successfully and return a 200 status code?

srsi
28 May 2013, 6:43 AM
Hi,

Thanks for the reply. I was able to solve this by making sure that my parent model has no null values as below.

Student.java

String id;
String name;
Details details new Details();

This resolved my problem.