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

Re: SAPUI5 - Doubt on how model and context works

$
0
0
I haven't understood really why, but it works..

 

Here is the explanation:

 

When you trigger navigation to people list, you pass the context of the pressed partner item with:

 

data : {

               context : e.getSource().getBindingContext()

           }

Then on the people view > onBeforeShow method, you get this pressed item context and set in on whole view (and list)

 

  this.getView().setBindingContext(evt.data.context);

 

So the absolute binding path which is already set on people list is /partners/0. Now all you need to do is to bind the remainig part on the people list. This is done with aggregation binding relatively to the context already used, so you just put people. As a result people list receive absolute binding /partners/0/people.

 

Note!

Absolute binding starts with slash /, relative binding starts with name token.

 

Regards

Marcin

 


Viewing all articles
Browse latest Browse all 8620

Trending Articles



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