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

ObjectListItem Aggregation Binding

$
0
0

Hi Experts,

 

I have a problem with the binding of an ObjectListItem:

 

the data looks like this:

 

                                                var data = {statuses:[                                                                {"text":"Twittertext 1",                                                                                user:{"name":"Tom"}                                                                },                                                                {"text":"Twittertext 2",                                                                                user:{"name":"Jan"}                                                                }                                                                ]                                                };

in the controller I wrote this:

 

                                                var twitterResult = new sap.ui.model.json.JSONModel();                                                twitterResult.setData(data);                                                this.getView().setModel(twitterResult, "twitterResult");

in the view:

 

                                                                <items>                                                                                <ObjectListItem                                                                                                                type="{= ${device>/system/phone} ? 'Active' : 'Inactive'}"                                                                                                                press="onSelectionChange"                                                                                                                title="{twitterResult>text}"                                                                                                                intro="{twitterResult/user>name}"                                                                                                                >                                                                                </ObjectListItem>                                                                </item

 

the text is visible but the name isn't...

 

I think there is something wrong with the binding:

 

intro="{twitterResult/user>name}"


but can't find it...


can anyone help me?


KR


Viewing all articles
Browse latest Browse all 2794

Trending Articles



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