Skip to Content

Fiori Elements: Knowing which cell is clicked

Hi,

In my list report, I have links (DataFieldWithIntentBasedNavigation) in cells.

My requirement is how to detect which cell I have clicked after the navigation ?

Regards,

Joseph

screenshot-24.png (42.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 16 at 07:37 AM

    Hello Joseph BERTHE

    Personally i cant find a nice way of doing this. Its like the SAPUI5 lib is missing something...

    But there is always a solution in javascript and jQuery.
    Add this to the onInit()

    //First add a click event to the table
    this.getView().byId("TableID").attachBrowserEvent("click",function(oEvent){
    //Get the id of cell that is clicked var targetId = oEvent.target.id
    //Just logging out the data, do whatever you want console.log(sap.ui.getCore().byId(targetId).getText()) }
    Add comment
    10|10000 characters needed characters exceeded