Question

I am trying to follow this example at http://ui5strap.com/docs/models.html. I want to bind the caption of the first widget. But its empty. Why? This is my current attempt:

<div data-sap-ui-type="ui5strap.Heading" data-level="4" data-text="{data>/widgets/data/caption}"></div>

I hope someone can help me!

Was it helpful?

Solution

Because you're trying to bind it like a normal single path. But "widgets" is an array. So you first have to create an aggregation to a list or a container.

Or you bind it like this:

/widgets/0/data/caption
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top