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

How can I pass values from a controller to the view?

$
0
0

I am using sap.m and sap.ui.core.mvc with an XML view. In the view, I have a control like this:

<List

        id="list"

        items="{

          path: '/Posts',

          filters: [myFilter]

        }"

...

</List>

 

I have a controller for this view. How can I pass a value to myFilter above? In my controller, I have this in my onInit function:

this.myFilter = new sap.ui.model.odata.Filter("post_type", [{operator: "EQ", value1: "question"}]);

 

Thanks for your help!


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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