cancel
Showing results for 
Search instead for 
Did you mean: 

attachSelect method of sap.tnt.NavigationListItem

0 Kudos

I am creating sap.tnt.NavigationListItem list from controller.

So now we have to select particular item which is not possible by view file because i am creating sap.tnt.NavigationListItem from controller file.

So i have to use attachSelect method from controller file

i have written following code but it is not working

var item = new sap.tnt.NavigationListItem(); item.setText(categoryName); item.attachSelect("onSelectCategory","select"); return item;

can you please help us regarding this

or Can you share us any example of this attachSelect method

View Entire Topic

Hi,

attachSelect() Attaches event handler fnFunction to the select event of this sap.tnt.NavigationListItem. So, instead of this:

var item = new sap.tnt.NavigationListItem(); item.setText(categoryName); item.attachSelect("onSelectCategory","select"); return item;

Replace attachSelect as below:

item.attachSelect(function(oEvent){

//Here goes functionality.

});

It is working.