Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8088

Re: No context/binding for list item when tapped

$
0
0

Hi David,

 

Perhaps this example might help you solve your problem?

 

If you go to the sap.m.List testsuite page at https://sapui5.netweaver.ondemand.com/sdk/test-resources/sap/m/List.html then use your browser developer tools to put a break point inside the handleTap function at around line 1572.

 

Now tap on any of the listitems to trigger the breakpoint.

 

The list item object can be found in this or you can also get it in e.getSource().

 

You can use the getBindingContext method to get the binding context from the listItem and the getPath method to get the binding path.

 

this.getBindingContext().getPath();

 

You can use this path in the getProperty method on the model to get the actual model data bound to the listItem.

 

this.getModel().getProperty(this.getBindingContext().getPath());

 

I hope this helps.

 

Cheers

Graham Robbo


Viewing all articles
Browse latest Browse all 8088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>