cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering elect Event of sap.m.table

Former Member
0 Kudos

Hi Experts, I have an issue with triggering select event of an sap.m.table. I have defined a table as follows :

I get a table with 1 entry as result after callin an odata service. The first time when i select the item from the table , the navigation to the details screen works fine. From the details screen i go back to the the table screen. After that : every time i try again to navigate to the details screen, the selet event is not triggered. I put a break inside the method onSelectOrder : no succes. Anybody has some tips/suggestions? Thanks in advance, Regards, Moo

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

SAPUI5 Explored

select

Event is fired when selection is changed by user interaction. In "multi-selection" mode, this event is also fired on "deselect"

Deprecated: Instead use "selectionChange" event.

selectionChange

Event is fired when selection is changed via user interaction inside the control.

Use this one instead

itemPress

This event is called when an item is pressed regardless of the selection mode. NOTE: This event is fired for all kind of list items unless the item's type is "Inactive".

Answers (1)

Answers (1)

saivellanki
Active Contributor
0 Kudos

Hi Moo,

If you're navigating page on Select of table list item to detail page, and if you navigate back from detail page to the main page, still the table selection will remain same.


To remove the table selections, you have to use below method and this code needs to be written where you navigation back logic is present -



sap.ui.getCore().byId("yourTableID").removeSelections();             

Check the sample here - Plunker - TableSelect

For more info on remove selections method, check API -

JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.m.ListBase

Regards,

Sai Vellanki.