PDA

View Full Version : Custom mapping function for JsonStore



csext5
27 Jul 2010, 9:30 PM
I'm trying to provide my own conversion function like this... is there a way I can do it using designer? If not, where should I modify JsonStore to perform conversion?
http://www.sencha.com/forum/showthread.php?105072-Reading-a-remote-String&highlight=jsonstore+convert

jarrednicholls
29 Jul 2010, 5:07 AM
The Designer won't allow an arbitrary inline function to be specified for the mapping config, only its string variation.

The easiest thing to do IMO is to 1) be sure you're done editing the Store in the Designer...it's "ready to go", then 2) make a copy of your Store's class file that's exported with the project, and 3) add your mapping function to the fields declaration directly, and use the copied file instead of the original.