on 04-05-2016 4:52 PM
hello
am still trying to get my hand around this data binding concept.
in my app I have a trip entity and an associated flight entity. For a selected trip how do I get the associated flight entity so I can set corresponding union trolls in the detail view. I have defined nav and associations in my EDMX file.
THanks.
Hi
my mockdata for flight is like this.
{
"TripID": "TripID 1",
"FlightConfNo": "FlightConfNo 1",
"FlightNo": "FlightNo 1",
"FlightName": "FlightName 1",
"FromCity": "FromCity 1",
"ToCity": "ToCity 1",
"DepartAt": "/Date(1376231869000)/",
"ArriveAt": "/Date(1455464269000)/",
"FlightCost": "FlightCost 1",
"CurrencyCode": "CurrencyCode 1",
"__metadata": {
"uri": "FlightSet(TripID='TripID 1',FlightConfNo='FlightConfNo 1')",
"type": "/IWBEP/GWSAMPLE_BASIC.Flight"
},
"ToFlight": {
"__deferred": {
"uri": "FlightSet(TripID='TripID 1',FlightConfNo='FlightConfNo 1')/ToFlight"
}
}
Now the trip details are displayed in the header and overview tab.
I want flight, rental etc to show up as feed list items in second icon tab.
This is the code snippet from the Detail view
<FeedListItem items="{ path : '/Flight' , parameters : {expand:'Trip'} }" counter="0" icon="sap-icon://flight" sender="Flight" text="{FlightName}" >
The flightname does not appear. What am i doing wrong?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Meera
Please use this as a reference
You do not have the path in the FeedListItem but you need a List as a container.
Thanks
-D
Hi,
By using your navigation property in one of these ways:
http://your.server/your_odata_endpoint/your_trip_entity_set?$expand=your_navproperty_to_flights
which lists your trips and you will get the flight info inline
http://your.server/your_odata_endpoint/your_trip_entity_set/your_navproperty_to_flights
and you will only get the flights
Greetz Silvio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.