PDA

View Full Version : messageProperty in JsonReader



piyushjain7
18 Feb 2010, 12:59 PM
Does the messageProperty in the JsonReader do anything automatically in the GridPanel e.g., show it in the toolbar , is there a config that needs to be set to switch this on?

or do the coder have to read it from the raw response and do something with it.

Thanks

gskluzacek
18 Nov 2010, 6:40 PM
I was wondering about the Ext.data.DataReader (and Ext.data.JsonRead) messageProperty configuration item too. As it is listed in the Config for a Data Store in Ext Designer. Though I've searched the code and do not see anything that actually uses that config setting. But I do see it in the comments.

Can anyone confirm that this config item doesn't currently do anything and that we need to get it's value (action.result.user_message from within the failure function) and then display it some how?

Regards
-- Greg

Screamy
19 Nov 2010, 7:10 AM
The messageProperty attribute is just a convenience property to specify the name of a field in the response which contains a user message. It's up to you to call getMessage() on the JsonReader (or other implementing class) and figure out what you want to do with the message.

gskluzacek
19 Nov 2010, 8:43 AM
Thanks Screamy -- BTW nice profile pic :)


It's up to you to call getMessage() on the JsonReader (or other implementing class) and figure out what you want to do with the message.

Didn't see any getMessage() method on the JsonReader (at least not in the API docs)... so this is something that needs to be implemented?

But yea, I get it... grab the value and do something with it -- display an Message box, or display the text in a status bar, etc.

Screamy
19 Nov 2010, 11:30 AM
It under 'Public Properties' and is listed as abstract.

Long live Marty Feldman!

B)

gskluzacek
19 Nov 2010, 2:24 PM
It under 'Public Properties' and is listed as abstract.


ok, yar, I see it now... I did a search for getMessage from the API Home page tab... apparently not everything is indexed.

Thanks
-- Greg