PDA

View Full Version : [CLOSED] Use Store / Model to create Json from object



jchau
Mar 28, 2014, 6:51 PM
I have a gridpanel on my page with a store and a model. During a directmethod, I want to return a serialized object back to the client using the fields I defined in the model. How can I access the code you guys are doing internally to bind a store? For example, I have an User object with 10 properties. My store / model is defined with only 5 fields. I want to deserialize that User object to Json with only those 5 fields.

Vladimir
Mar 28, 2014, 9:33 PM
You have to use ModelSerializer class which serializes a data according passed model
Please see
http://forums.ext.net/showthread.php?26842-2-3-ModelSerializer-a-helper-class-to-serialize-the-data-according-to-an-Ext-Net-Model-instance