on ‎2016 Jan 21 12:38 PM
Hello Experts,
Need your help in understanding the context binding issue I am facing in UI5 demo application design.
1. I created on RFC Function Module to pull data for flight booking details as well Airline booking count.
2. Created oData using this FM and tested in GW Client, it seems OK.
3. There is a referential constraint like for one single Airline selection from Master page will display concerned booking information (1:N) in detail page.
Selecting record in master page gives the data in detail page but only the last record of booking information is being displayed.
Kindly see the below screen shot. Tried a lot but couldn't fix the issue. So if you can kindly help me in this regards.
I can find in debug the total booking record in internal table is as per the below screen shot
But is only displays the last record in series (1 --> 5362). Any idea on this?
Thanks , SL
Request clarification before answering.
The entityset that Table Header uses might not have an unique id. Have bookingId & customerId as key properties defined to that entityset.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What binding are you using in the detail view table and what context are you setting the view to in the controller? The table should be using the bookings collection for the table items aggregation. The context should be setting the view to /flight('flightnumber'). Check the network tab of the browser dev console to confirm what is getting called.
Regards,
Jamie
SAP - Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jamie,
Here is the context information being passed to Detail View:
Here ExFdetails contains the information for Master View and the concerned selective element which is LH (Carrid) / (2402) Connid being passed to Detail view as key information.
Now system is picking the concerned booking details using this CARRID and CONNID. The result count is correct as per here 5362.
Now when it is being displayed in detail screen it is only rendering the last line in that result set.
Detail controller code snippet is as below:
sap.ui.controller("sap.ui5.sflight.zui5_sflight_book.Detail", {
| onInit : function() { | ||
| // handle data loaded events | ||
| var oBus = new sap.ui.getCore().getEventBus(); |
| oBus.subscribe("sflight_app", "ReadyToFetchDetails", | ||||
| this.handleFetchDetails, this); | ||||
| }, |
handleFetchDetails : function(sCannelID, sEvtId, oData) {
alert("Next");
var oContext = oData.oCtx;
if (oContext) {
// Bind object header to the OData model
var oHeader = this.byId('header_flight');
var sODataFilterPath = oContext.sPath + '/ExFlbookSet';
oHeader.bindElement(sODataFilterPath);
this.getView().setBindingContext(oContext);
this.getView().byId("page_Detail").scrollTo(0);
}
},
Here ExFlbookSet will return the booking results.
Please advice.
Thanks , SL
Hi,
Can you check in routing, what parameters are being passed to detail pattern. Please check showDetailItem method of master controller.
Regards,
Sanjoy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.