on 04-11-2016 1:28 PM
Hi All,
I am a SAPUI5 newbie and facing some issues with my first Fiori App. I want to bind a sap.m.select control to a table from our backend system. Lets say that I have binded the current view to a "Trip" model and now if I want to bind a sap.m.select control to "Countries" table from backend how can i do that. How can i show values from country table in a sap.m.select control used in XML views. I have already tried the below code but the select control is coming as blank with no item in items aggregation.
<Select xmlns:sap.ui.core="sap.ui.core" selectedItem="Element sap.ui.core.ListItem#__item3"
selectedKey="item1" selectedItemId="__item3" id="lstDestination"
items="{path: 'CountryCollection'}">
<sap.ui.core:Item key="{LAND1}" text="{INTCA3}" />
</Select>
Thanks a lot.
Hello Jatinder,
Try using items="{path: '/CountryCollection'}"> and check in the network tab that an oData Call is going to the backend or not?
Regards,
Vikash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vikash,
Thanks for replying. However items="{path: '/CountryCollection'}" attribute is already mentioned. And when checked i found that no request is being sent for fetching CountryCollection. I have already set the model for the view, which is "TripCollection", where can i set the model for select control so that it sends a request to fetch countrycollection.
User | Count |
---|---|
67 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.