Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

a question about CustomListItem

I have built an XML view as follow:

<List

id="people_list"

class="sapUiResponsiveMargin"

headerText="Custom Content"

items="{people>/People}">

<items>

<CustomListItem>

<Button text="{people>ProductName}"/>

</CustomListItem>

<CustomListItem>

<Label text="{people>ProductName}"/>

</CustomListItem>

</items>

</List>

"people" is JSON model in walkthrough sample.

I want to show a list of customizing item, which has two levels, a button above and a label below.

But what I get is only Labels, with Buttons disappearing as the attached picture shows.

I am wondering what's wrong with my code.

lit.png (6232 B)
replied

Hi Ming,

You have to place both the controls in content Aggregation of CustomListItem like this -

<CustomListItem>

<content>

<Label text="{people>ProductName}"/>

<Button text="{people>ProductName}"/>

</content>

</CustomListItem>

Check the API for reference - JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.m.CustomListItem

Regards,

Sai Vellanki.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question