Skip to Content
0
Former Member
Nov 17, 2015 at 07:19 AM

Fiori style sapui5 app

24 Views

Hi All,

I am creating an Fiori style master-detail app in eclipse in a simple sapui5 manner.(using html and JS).

In the master view everything is looking good as expected,but in detail view page i am getting an fixed output.

in the master page will have an employee lists,when i click on particular employee,i should get the respective output on the right side(detail page),

but i am getting the same person's output.

I found out where i am going wrong,but don't know how to fix it.

The error is with objectHeader,

my code is below,

var head=new sap.m.ObjectHeader("head", {title:"{/results/0/FirstName}",

number:"{/results/0/EmpNum}",

numberUnit:"{/results/0/Division}",

attributes : [new sap.m.ObjectAttribute({text :"{/results/0/Designation}"}),

new sap.m.ObjectAttribute({text :"{/results/0/Mobile}"}),

new sap.m.ObjectAttribute({text :"{/results/0/LandlineNum}"}),

new sap.m.ObjectAttribute({text :"{/results/0/Emailid}"}),

new sap.m.ObjectAttribute({text :"{/results/0/Location}"}),

new sap.m.ObjectAttribute({text :"{/results/0/Extn}"})

],

this results/0/... actually considers as employee list as array....if i give results/0/...,the first data details are displayed(fixed data for all ) even if i click on the someotherdata,i get the same output.

The way i define the oData might be wrong.Help me with this.

The odata is,

proxy/http/DB41VV12.mobolutions.com:8001/sap/opu/odata/sap/ZHCP_CREDITMEMOAPPROVAL_NEW_SRV/CRHeaderSet

PFA the image also.