Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Use bindAggregation for multiple selection

$
0
0

Hi all,

 

I have created a selection for nationalities by using a odata service with the following working source:

 

this.countrySelect = new sap.m.Select({selectedKey:"NL",name: "Countries",});
this.countrySelectItems = new sap.ui.core.Item({key: "{Land1}",text: "{Landx50}"});
this.countrySelect.bindAggregation("items", "/CountryCodesSet", this.countrySelectItems);

 

Now I want to create a second selection based on the same odata service.

 

When I use the following code:

 

this.countryBirth = new sap.m.Select({selectedKey:"NL",name: "CountriesBirth",});
this.countryBirth.bindAggregation("items", "/CountryCodesSet", this.countrySelectionItems);

 

When I use this code the view does not open any more!

 

How can I use the same binding for two selection?

 

Kind regards,

Richard


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>