Skip to Content
Technical Articles
Author's profile photo Dhanasupriya Sidagam

Pin customData aggregation to any control in SAP UI5

Hey all

This exposition presents a flash of how one can use an aggregation: customData to any control in SAP Ui5.

I made use of Standard List Item control for my blog display.


As we can see here, coded for customData inside StandardListItem.

<mvc:View controllerName="practise.StandardList_CustomData.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m"
	<List id="ShortProductList" headerText="Suppliers" items="{ path: '/Suppliers', sorter: { path: 'SupplierID' } }">
			<StandardListItem title="{CompanyName}" info="" infoState="Success" press="onListPress" type="Active" description="">
					<core:CustomData key="Name" value="{ContactName}"/>
					<core:CustomData key="City" value="{City}"/>


My intention of this blog is how one can make use of customData. So here comes the answer shown in onListPress function based on key.

], 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");


on click of list item, we are able to look added information.

Thank you!! 🙂

Happy Learnings!!!

BR//Dhanasupriya Sidagam

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Samir Kulkarni
      Samir Kulkarni

      Thanks for the small but useful post Dhanasupriya!