How to generate JSON object on client side and send it to server?
Posted
by EugeneS
on Stack Overflow
See other posts from Stack Overflow
or by EugeneS
Published on 2010-05-26T10:37:44Z
Indexed on
2010/05/26
10:41 UTC
Read the original article
Hit count: 141
I have ExtJS based application. I have compound object on the server side, and have ExtJS window with few tabs for editing different parts of this one object. For example:
I Have Compound object "Car"
public class Car { public string Name; public string Color;
public List Wheels; public List Doors; }
And on my ExtJS window i have tabs ("General Info", "Wheels", "Doors") for editing different parts of this object.
So what i want:
When i want to create a new car i want to generate JSON configuration for my class "Car" like {Name:null; Color:null; Wheels:[]; Doors:[]} then sent it to the client, fill it on the client (without callbacks to server) and after user finishes creating his Car object (he added wheels, doors, set name and color) and press save, I want to sent this filled(generated) JSON object to server and save it to DB.
Is it possible?
Thanks
© Stack Overflow or respective owner