Whether this
<List id="list" items="{/Report}">
<items>
<ObjectListItem press="onSelect" title="{TYPE}"> </ObjectListItem>
</items>
</List>
nor this
<List id="list" items="{/Report}" itemPress="onSelect">
<items>
<ObjectListItem title="{TYPE}"> </ObjectListItem>
</items>
</List>
fires
onSelect : function (oEvent) {
'use strict';
console.log("onSelect");
}
in the Controller.
What may cause this? There is no related error message in the console.
By default ObjectListItem type is set to InActive. If its set to any other type, say 'Active' the press event will be triggered.
<ObjectListItem
press="onSelect"
title="{TYPE}"
type = "Active">
</ObjectListItem>
https://sapui5.hana.ondemand.com/sdk/docs/api/symbols/sap.m.ListType.html
https://openui5.hana.ondemand.com/docs/api/symbols/sap.m.ListBase.html#event:itemPress
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With