<mvc:View controllerName="practise.StandardList_CustomData.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m"
xmlns:core="sap.ui.core">
<List id="ShortProductList" headerText="Suppliers" items="{ path: '/Suppliers', sorter: { path: 'SupplierID' } }">
<items>
<StandardListItem title="{CompanyName}" info="" infoState="Success" press="onListPress" type="Active" description="">
<customData>
<core:CustomData key="Name" value="{ContactName}"/>
<core:CustomData key="City" value="{City}"/>
</customData>
</StandardListItem>
</items>
</List>
</mvc:View>sap.ui.define([
"sap/ui/core/mvc/Controller"
], function (Controller) {
"use strict";
return Controller.extend("practise.StandardList_CustomData.controller.View1", {
onListPress: function (oEvent) {
var oName = oEvent.getSource().data("Name");
var oCity = oEvent.getSource().data("City");
oEvent.getSource().setDescription(oName);
oEvent.getSource().setInfo(oCity);
}
});
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 32 | |
| 28 | |
| 22 | |
| 13 | |
| 13 | |
| 12 | |
| 11 | |
| 10 | |
| 10 | |
| 8 |