cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 How to get the title with NotificationListItem

Former Member
0 Kudos

I had added a button on NotificationListItem and assigned the press event"onRejectPress" and there is a "onListItemPress" also. When I press the line I can goto the function onListItemPress and get the title contants through "oEvent.getSource().getTitle()"

But when I click the button "Reject" I can't get the title contant through "oEvent.getSource().getTitle()". Who can tell me how can I get the title contants in function() onRejectPress". Thank you~

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

As you can see, title is not a property for Reject Button control, it is having text property. When you tried to get the title from "onListItemPress" method, you got just because you had the event for NotificationListItem control which has title property. Here you want to get the title value of NotificationListItem control from button event which is other control. So you can achieve via bindingcontext from button event where you will get the object of clicked record.

"oEvent.getSource().getBindingContext().getObject().Vid"

junwu
Active Contributor
0 Kudos

oEvent.getSource().getBindingContext().getObject().Vid