Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

unable to perform any event on listitem

Hi, I created one list item but when i am applying press event on the list item .No response in ouptut page.

No error nothing happened.

Please find my code and help me.

VIew.js

var list1 = new sap.m.List({

  id : "master1", inset: false,

  itemPress : function(oevent)

  {oController. handleListItemPress(oevent);}

  });

  var template = new sap.m.StandardListItem({

  title : "{SoId}"

  });

  list1.bindItems({path : "/SalesOrderCollection",template :template} );

  return list1;

controller.js

--------------------

handleListItemPress : function (evt) {

  //var context = evt.getSource().getBindingContext();

  //this.nav.to("Detail", context);

  alert (evt.getParameters().listItem);

  }

Tags:
Former Member
Former Member replied

Hi

You have the set the item type to Active like this.

Example

-D

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question