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
DataBind - a template plugin for jQuery. The library has a method unbinddata()
, which collects the data back to json-array.
Unfortunately, the library works only with form inputs.
If you made some solution, can I see it?
Microsoft has a proposal for an enhancement to jQuery core that implements decently reach data binding including a two binding (source to target, and target to source).
They call it Data Linking - which is odd since the name of this concept in all other MS technologies (WinForms, WPF, WebForms, etc...) is DataBinding.
Link to the MS Proposal
There are tons of libraries out there to achieve what you want.
For starters, you can use DWR to get the Ajax functionality. The method that gets triggered for the form field's onChange
event should make a DWR call to the corresponding backing object
Hope this helps!