I've build a table, that it looks as following:
and the code:
<ColumnListItem type="Detail" detailPress="onDetailPress">
<cells>
<ObjectIdentifier title="{Customer>CustomerID}" text="{Customer>CompanyName}"/>
<Text text="{Customer>ContactName}"/>
<Text text="{Customer>Address}"/>
<Text text="{Customer>City}"/>
</cells>
</ColumnListItem>
When I press on the pencil, it will emit the event detailPress
:
onDetailPress: function(oEvent) {
console.log(oEvent.getParameters());
}
What is the return type getParameters()
method call on the event object? The doc does not mention any type.
How can I get the Customer details of the pressed list item using the oEvent.
The debugger says:
you can get the object that is bound to the row like this
onDetailPress: function(oEvent) {
var oObject = oEvent.getSource().getBindingContext("Customer").getObject();
// from this object, you can do oObject.CustomerID
}