0
votes

I'm trying to concatenate two model properties into one string that would be the name of my items list but I don't get to do that correctly :

<List items="{= '{oModel>/' ${oModel>/class} '}'" ></List>

Is there any way I can do this concatenation in XML View so I get {oModel>/ABC} as list items for example if ABC is the value in oModel>/class property.

Thanks

1
Dynamic binding paths are not possible. You can achieve it in controller. - inizio

1 Answers

1
votes

It is not possible to do it in the view as you want.

As @inizio mentionned you can achieve it in the controler like this:

var sClass = this.getModel('oModel').getProperty('/class');
this.byId('id-of-list').bindItems({
   path: "oModel>/" + sClass",
   template: ..., 
)}