sap fiori listbox
时间: 2023-09-21 21:10:45 浏览: 86
SAP Fiori offers a ListBox control that is used to display a list of items to the user. The ListBox can be used in various scenarios, such as for selecting items from a list, displaying a list of options, or displaying a list of items in a report.
To use the ListBox control in your SAP Fiori application, you can follow these steps:
1. Add the sap.m.ListBox control to your view.
2. Define the items to be displayed in the ListBox. This can be done by binding the ListBox control to a model that contains the items to be displayed.
3. Define the template for the items in the ListBox. This can be done by defining the ListItem control and its properties.
4. Define any additional properties for the ListBox control, such as the mode (single or multi-selection) and the selection change event.
Here is an example of the ListBox control in SAP Fiori:
```
<ListBox items="{/items}" mode="SingleSelectMaster" selectionChange="onSelectionChange">
<items>
<StandardListItem title="{title}" description="{description}" icon="{icon}" />
</items>
</ListBox>
```
In this example, the ListBox is bound to a model that contains the items to be displayed. The template for the items is defined using the StandardListItem control, and the mode is set to SingleSelectMaster. The selectionChange event is also defined to handle any changes in the selected item.
阅读全文