on 01-28-2015 7:13 AM
Hello guys,
I'm trying to build an UI5 application in which there is 1 to M cardinality. By using the below code in detail.controller.js, I'm able to fetch only the first row of my detail set.
detail.controller.js
onInit : function() {
/*
* this.getView().addEventDelegate({ onBeforeShow :
* jQuery.proxy(function(oEvt) { this.onBeforeShow(oEvt); }, this) });
*/
var bus = sap.ui.getCore().getEventBus();
bus.subscribe("app", "RefreshDetail", this._refresh, this);
},
_refresh : function(channelId, eventId, data) {
var Bomnumber = data.Bomnumber;
this.getView().byId("bomnumber").getValue(Bomnumber);
var path = "/detailppSet('" + Bomnumber + "')";
this.byId("detail").bindElement(path);
this.byId("title").bindElement(path);
},
I need help to fetch multiple item details from detail set by giving one input from master set using odata service
Looking forward for your reply.
Thank you.
Anto.
Hi,
Can somebody please help me with a solution...I'm not able to go ahead with the application development as per the requirements given.
Looking forward for your reply.
Regards,
Anto.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys,
I have figured it out to get the detail list item by passing one input item from master list. I've posted the code for the following below.
Detail.controller.js
onInit : function() {
/*
* this.getView().addEventDelegate({ onBeforeShow :
* jQuery.proxy(function(oEvt) { this.onBeforeShow(oEvt); }, this) });
*/
var bus = sap.ui.getCore().getEventBus();
bus.subscribe("app", "RefreshDetail", this._refresh, this);
var oModel = new sap.ui.model.odata.ODataModel(
"/sap/opu/odata/SAP/ZPPBOM_ODATA1_SRV_01",
true);
var oTable = new sap.m.Table("detail1");
oTable.setModel(oModel);
},
_refresh : function(channelId, eventId, data) {
var Bomnumber = data.Bomnumber;
// this.byId("xyz").bindElement(Bomnumber);
var oFilter = (new sap.ui.model.Filter("Stlnr",
sap.ui.model.FilterOperator.EQ, Bomnumber));
//this.getView().byId("detail").getBinding("items").filter(oFilter);
this.byId("detail1").getBinding("items").filter(oFilter);
this.byId("stlnr").setText(Bomnumber);
},
give the table an id and bind it to the controller.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
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.