Hello and Greetings,
Problem: How get all the data present/selected in the elements and combine them in a single JSON object to be sent to the server via an REST’ful call.
Set-up information: I have created a simple page where I have different UI components: TextBoxes, Radio Buttons, List, Rich Select, Multiselect List, Checkboxes ( as given in http://docs.webix.com/desktop__controls.html )
Some of these elements are directly contained in views while some are embedded in the body of accordion.
Desired Action/Result: When I press the ‘Save’ button, all of the data contained in the various elements should be aggregated to a JSON object to be sent via a POST (REST’ful call).
e.g. of a ‘department’ object with the attributes that need to be sent to the server. Hence here, for example, the “area” value comes from a Textbox whereas value of “department_ranking” come from a Rich Select dropdown list. How do I collect all this data and put them into one JSON object ( like ‘shop’ below) to be sent as a POST to the server?
{
“department”:[
{“area” : “mathematical_computing”},
{"_id" : “01_computing"},
{“Applicable_industries” : [{
“Aerospace”: “true”,
“Marine”: “true”
}]
},
{“contact_person” : [{
“name” :“Jim”,
“contact_for”:“Lab Assistance”
}]
},
{“department_ranking":“b+”}
]
}
Any help or pointers would be greatly appreciated and helpful. Thanks in Advance!
-Tubu