Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

retrieve bindingcontext from list and standardlistitem

$
0
0

Hi everyone,

 

I think this is a silly question but since I am a newbie and i am trying to learn sapui5 kindly guide me  .I am using a sap.m.List and sap.m.StandardlistItem as a template to the list.

Now sap.m.list has some events like select , selectionchange etc and whereas sap.m.standardlistitem has some events like tap, press etc.

Now my question is

 

1. To which control should i set my model to (is it list or standardlistitem)

2. In  Which event should i  get the bindingcontext ? is it inside the list events or standardlistitem events?

3. I have seen to retrieve a bindingcontext we have 2 ways

a)  oEvent.getSource().getBindingContext()

b) oEvent.getParameter("listItem").getBindingContext()

 

I am confused which one to use to retrieve the bindingcontext . It has become like a trial and error for me, if one doesn work i choose another one.

 

So kindly guide me what approach should one take to retieve the bindingcontext

 

Thanks &regards

Lahari


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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