Ajax data two-way data binding strategies?
- by morgancodes
I'd like to
1) Draw create form fields and populate them with data from javascript objects
2) Update those backing objects whenever the value of the form field changes
Number 1 is easy. I have a few js template systems I've been using that work quite nicely.
Number 2 may require a bit of thought. A quick google search on "ajax data binding" turned up a few systems which seem basically one-way. They're designed to update a UI based on backing js objects, but don't seem to address the question of how to update those backing objects when changes are made to the UI. Can anyone recommend any libraries which will do this for me? It's something I can write myself without too much trouble, but if this question has already been thought through, I'd rather not duplicate the work.