PDA

View Full Version : JsonStore getMessage()



GoneIn20Seconds
16 Jun 2010, 12:44 PM
Sorry if I am just being dumb and not seeing this in the documentation, but I cant figure this out.

I'm using a JsonStore to load a grid with data, but I'm also sending a status message with the JSON. The grid populates from the store just fine, but the question is, how do I get the message from the store?

If it were a JsonReader then I could use getMessage() but the store doesn't have that function. Anyone know the answer to this?

Sample Code:


var store = new Ext.data.JsonStore({
autoDestroy: true,
url: "ajax/user_search.php",
root: "root",
messageProperty: "status",
fields: [
"netid",
"name",
"title"
]
);
Sample Response:


{"root":[{"netid":"jbean","name":"Jimmy Bean","title":"Gardener"}],"success":false,"status":"Success"}

Animal
16 Jun 2010, 1:17 PM
http://www.sencha.com/deploy/dev/docs/?class=Ext.data.JsonReader&member=jsonData

GoneIn20Seconds
16 Jun 2010, 1:28 PM
Thanks for the direction, Animal. That did the trick for me.