Skip to Content
0
Apr 13, 2014 at 01:05 PM

Data Binding to array model

34 Views

Hi guys, given the following data model

data =

{

"company": "my company",

"phone" : [{ "number" : 123 } , { "number" : 456 } ]

}

i could easily bind to the ui5 element in xml like the following:

<Button text="{/company}"/>

The question is how could I bind the data to the first index of the phone array to a Button element.

The following does not work,

<Button text="{/phone/0/number}"/>

Any clue if i want the button text to be asigned to 123 value?

Thanks in advance.