hello i have got problem to configure my form and using errorReader
i have got standard formPanel with some textfield eq. 'role', 'tmpPhoto' etc
and i need add server validation . In ext site example is only one example with xml, but my server controller (spring) return error validation message as JSON. And this is example JSON error message :
PHP Code:
{"success":false,"errors":{"tmpPhoto":"tmpPhoto must not be null","role":"role must not be null"}}
so what i get i get root element as errors and fieldName --> error . I wrote something like that:
PHP Code:
Ext.define('bandsman.error',{
extend: 'Ext.data.Model',
fields:['tmpPhoto','role']
})
And in form i have got :
PHP Code:
errorReader: Ext.create('Ext.data.reader.Json',{
id: 'jsonReader',
root: 'errors',
model: 'bandsman.error',
successProperty: '@success'
}),
but its not working for me , in errorReader doc they wrote that error message must have got id and msg its so complicated for me ...
Can yout tell me how can i do this ?