Skip to Content
avatar image
Former Member

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);

  }

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 04, 2015 at 06:53 PM

    Hi

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

    Example

    -D

    Add comment
    10|10000 characters needed characters exceeded