on 10-21-2015 1:21 PM
Hi Experts,
I am extending My Leads Fiori App(CRM) and adding new icon tab on s3.view.xml.
I want to show sales area details in the icon tab as form.
The code for extension tab is :
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core"
xmlns:ui="sap.ui.layout.form">
<IconTabFilter id="SalesAreaDetails" text="Sales Area Details" icon="sap-icon://sales-order">
<content>
<ui:SimpleForm id="SalesData">
<ui:content>
<Label id="SalesOrg_label" text="{i18n>SALES_ORGANISATION}"></Label>
<Text id="lead_SalesOrg_text" text="{json>/SalesOrganisation}"></Text>
</ui:content>
<ui:content>
<Label id="DisChannel_label" text="{i18n>DISTRIBUTION_CHANNEL}"></Label>
<Text id="lead_DisChannel_text" text="{json>/DistributionChannel}"></Text>
</ui:content>
<ui:content>
<Label id="Divison_label" text="{i18n>DIVISION}"></Label>
<Text id="lead_Division_text" text="{json>/Division}"></Text>
</ui:content>
<ui:content>
<Label id="SalesGroup_label" text="{i18n>SALES_GROUP}"></Label>
<Text id="lead_SalesGroup_text" text="{json>/SalesGroup}"></Text>
</ui:content>
<ui:content>
<Label id="SalesOffice_label" text="{i18n>SALES_OFFICE}"></Label>
<Text id="lead_SalesOffice_text" text="{json>/SalesOffice}"></Text>
</ui:content>
</ui:SimpleForm>
</content>
</IconTabFilter>
</core:FragmentDefinition>
Here, I am able to show the labels but i am not able to get the data for the particular labels.
Also, when i am debugging and checking the service, i am able to get the data in the service. It is shown below:
Kindly Help,
Warm Regards
Raina Goyal
Hi Raina,
I don't think you need to extend the controller for this implementation, controller is used in conditions where you have to handle some events, this can be accomplished without extending the controller.
Thanks and Regards
Hardik Bhardwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raina,
Go to console---> write sap.ui.getCore().getModel("json")----> find your records are available or not?
Thanks,
Karthik A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karthik A
I have already tried this statement and it always says "undefined".
Thanks and Regards
Raina
Hi Raina,
Yah, Problem occurs here.
In your fragment you are using json (<Text id="lead_DisChannel_text" text="{json>/DistributionChannel) model to bind your records.
Solution:
Go to your service call---> under success block---> collect your records ----> put it in JSON model----> Bind that model to your fragment/view/core.
for ex:
var jsonModel = new sap.ui.model.json.JSONModel(your records);
this.getView().setModel(jsonModel);
Thanks,
Karthik A
Hi Karthik A
I have extended the controller and have bind the json model in it , but still i am not able to resolve my problem.
Kindly advice.
Thanks and Regards
Raina
Kindly refer this link
Using Dialogs Defined as Fragments - User Interface Add-On for SAP NetWeaver - SAP Library
Thanks,
Karthik A
Hi Raina,
I am facing a similar challenge while extending a CRM application, so if you get any solution please share it with me as well.
Thanks & Regards
Hardik Bhardwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.