on 10-26-2015 11:32 AM
Hi Experts,
I am extending an SAP Fiori My Leads application following the SAP best practices.
I want to extend s3.controller.js in order to get the data for a custom tab that i have already implemented, but on debugging i found that no service is being invoked when i click the tab.
Kindly advice.
Thanks and Regards,
Raina Goyal
Hi Raina;
Do you see any console errors in the browser.
Please provide more details regarding the code you have written in the extension.
Where you are calling the service. Provide few screenshots also of the extended application for better understanding.
Regards,
Sarbjeet Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarbjeet Singh,
No, there aren't any errors in the console in browser.
I am adding a new tab icon and wanted to show the sales organisational data. I am able to show the labels but the data isn't fetched from backend. The screen is below:
Also, when i debug after clicking this "Sales area " tab, it is not hitting backend and does not show any service.
Do i need to create a new entity set for it, as i have extended lead entity and it has the data.
Kindly advice.
Thanks and Regards
Raina
Hi Raina;
In S3 controller you will find a method selectedTab
selectedTab: function(oControlEvent) {
var oModel = this.oModel;
var tab_selection = oControlEvent.getSource().getSelectedKey();
var that = this;
this controller will call the backend odata on selecting a tab.
Please add the code for your tab also here and then implement a expand for the same in the backend.
Regards,
Sarbjeet Singh
Hi Sarbjeet Singh,
My custom controller code is as follow:
Where do i put this code?
Thanks and Regards
Raina
Hi Sarbjeet Singh,
Thank you.
Could you please tell me how to bind it?
When i write this.oModel.oData----> in console, it shows me the data. But how to bind it with json model?
Please suggest.
Thanks and Regards
Raina Goyal
var oData_m = this.oModel.oData;
var tab = this.getView().byId("SalesAreaDetails");
var jsonModel = new sap.ui.model.json.JSONModel(oData_m);
tab.setModel(jsonModel, "json1");
Regards,
Sarbjeet Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.