Hi
I am trying to get data on press event.
I tried to follow this http://jsbin.com/openui5-mobile-list-databinding/2/edit
Since it is standardlistitem I cannot put lot of data in an item, So I used a customlistitem. Here on press event I am trying to get the text present in it.
var list1 = new sap.m.CustomListItem( {
id : "list1",
type: sap.m.ListType.Navigation,
content:[new sap.m.Text({text:"{Kunnr}"}) ] ,
press:function(evt){
var control = evt.getSource().getContent().getText();
alert(control);
}
})
I not able to get any alert.
And If I use evt.getSource().getContent() I am getting Element sap.m.Text#_text0-_clone 0 in the alert..
Can someone help me out with this.