I want to bind a TextField to a property which is specified by a string variable (see the edit for a better explanation), as in this question. Unfortunately the answer that was
After many failed attempts I found a pretty simple solution.
Add the helper
Ember.Handlebars.helper('dataTextField', function (data, key, options) {
options.hash.valueBinding = 'data.' + key;
return Ember.Handlebars.helpers.input.apply(this, [options]);
});
and then call
{{dataTextField data key}}
This will render a text field that shows and changes the value of data[key]
and it even supports all the optional arguments the normal input
helper can understand.