Search code examples
sencha-touchsencha-touch-2

Sencha Touch: Clear listeners on an individual list item


In a TreeStore I have a list item / record which differs from all the other records. I want to execute window.open() whenever the user clicks on this specific record. The other records should maintain their usual functionality. (leafItemTap => detailCard)

I have tried all events of NestedList that made sense to me but no success.

My basic idea is to clear all listeners on the list item and add a custom one for the window.open() task.


Solution

  • Try to use select event, it's preventable so you just need to return false. However, you need to do extra work to deselect previously selected item:

    http://docs.sencha.com/touch/2.3.1/#!/api/Ext.dataview.List-event-select