Skip to Content
0

Fiori Elements: Knowing which cell is clicked

Apr 16 at 07:01 AM

50

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Nicholas Owen O’Malley Apr 16 at 07:37 AM
0

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()) }
Show 5 Share
10 |10000 characters needed characters left characters exceeded

Hi,

Thanks for your answer, but I am in Fiori Elements context, so I'm searching something more "standard" :)

Regards,

Joseph

0

Ok :)

Please leave a comment on the "standard" way of doing it if you can find it, i cant find it my self, so would be a nice ting to learn :)

0
Joseph BERTHE

why you need it? if you are not doing something standard, why you expect standard support from fiori elements?

0

What i'm doing is completly standard. What I would like is to identify in which "context" am'I when I'm navigating from List report to my Object Page.

I'm building an monitoring application, and this feature would be very useful in table card from OVP application as well.

0
Joseph BERTHE

can you elaborate?

0