PDA

View Full Version : Fundamental conceptual breakdown



BillHubbard
3 Oct 2013, 2:59 PM
I'm confused about field mapping between data, models and forms and there seems to be a fundamental disconnect in ExtJS 4.0.5 (maybe this is fixed in the latest version?).

In a model, I can define a converter to map a field to the actual property received through JSON into the model's data. This works fine on the intake - for READING the property - which is what I do when I load this model into a form (form.loadRecord). But when getting data out of a form (form.updateRecord), there appears to be no converter/setter to place the value BACK into the appropriate property in the model's data. Instead, I wind up sending back the same data (if any) that I read in.

Surely I'm overlooking something...

evant
3 Oct 2013, 3:48 PM
Such a feature was introduced after 4.0.x, not sure which version exactly. Check out the latest codebase for writer.Json, you should be able to pull it in.