PDA

View Full Version : How Can I Take property from server?



Reverent
26 Feb 2015, 7:49 AM
If I use CRUD I write this code for create new item.



someModel.save
(
{
success: function()
{

},
failure: function()
{
// There’s code for take "errormsg" …
}
}
);


For example my server responds me by JSON like this:
{success: false, errormsg: "isExist"}

How can I take "errormsg" in ExtJs because I have to show alert with warning?

yeghikyan
27 Feb 2015, 2:30 AM
So...
https://fiddle.sencha.com/fiddle/ite (https://fiddle.sencha.com/fiddle/ite)

Reverent
28 Feb 2015, 4:19 AM
Thank's a lot! It's working!