Is it possible to bind control property to model with dynamic property name, stored, for instance, within another model field? I thought we can use SAPUI5 Expression Binding for this purpose, but it doesn't work: binding in trace window is broken and expression seems to be not evaluated at all.
XML View
<TextArea value="{= ${StackOverflow>/bindTextAreaTo} }" />
Controller
oModel = this.getView().getModel("StackOverflow");
/*
* The model have two properties: question and comment
* I want value of TextArea to be bound to one of them based on some condition
*/
oModel.setProperty("/question", "");
oModel.setProperty("/comment", "");
oModel.setProperty("/bindTextAreaTo",
bAsk ? "StackOverflow>/question" : "StackOverflow>/comment" );