on 11-04-2015 9:01 AM
Hi,
I am using below url
http://xxxxxxxxxxxxxxxxxxxxxx/sap/opu/odata/EMT/PMAPP_SRV/DeviceInfoCollection?
$filter=TransmitType%20eq%20%27LOAD%27&$e…
here DeviceInfoCollection is header, Loadsettings and Refreshsettings are items
how to bind this to sap.m.Table
i tried using below code but i'm getting error in binding to Table
<Table selectionChange="index" id="ID_CAUSETABLE" inset="false" columns="{path : 'modelPersons2>/DeviceInfoCollection' , parameters:{expand : 'Loadsettings'} }"> | ||||
<columns> | ||||
<Column id="col0"> |
</Column> | ||||||
<Column id="col1"> | ||||||
<Text text="ID" /> | ||||||
</Column> | ||||||
<Column id="col2"> | ||||||
<Text text="Supplier Name" /> | ||||||
</Column> | ||||||
</columns> |
</Table> | ||
Thanks
Venkat
Hi Venkat,
You should be binding the items of the table. You can find an example at
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.
Hi Jamie Cawley,
The example which is there in SAPUI5 Explored is for individual url i mean they are not used expand property in that.
Can you give example which contains expand property and don't know how to use that expand keyword for my Url's
http:// xxxxxxxxxxxxxxxxxEMT/PMAPPSRV/EuipmentBomsCollection?$filter=TransmitType%20eq%20%27LOAD%27%20and%20User%20eq%20%27TESTUSER%27%20&$expand=EquipHeaders%2FEquipItems
for the above url i tried like this but data is not displaying
items : {
path : "/EuipmentBomsCollection",
parameters : {
expand : "/EquipmentItem"
},
factory : function(sId, oContext) {
var sContactTitle = oContext
.getProperty("EquipmentItem");
return new sap.m.ColumnListItem(sId, {
cells : [ new sap.m.Text({
text : "{Bom}"
}), new sap.m.Text({
text : "{BomComponent}"
}), new sap.m.Text({
text : "{CompText}"
})]
})
}
}
can you tel me what is wrong in this code.
Thanks & Regards
Venkat
Hi Venkatachalam,
you can try this example.
oControl.bindElement("/Category(1)", {expand: "Products"});
oTable.bindRows({
path: "/Products",
parameters: {expand: "Category"}
});
Referred from: Instantiating an OData Model - User Interface Add-On for SAP NetWeaver - SAP Library
Thanks,
KA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
12 | |
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.