jeudi 22 décembre 2016

Add checkboxes in SAPUI5 list

Dear SAPUI5 developer,

I made a master details application.

I want to give this ability to the user that select multiple item and then press delete button.

For this purpose I need to add some checkboxes in front of list items. The data for the list comes from OData service.

Here is the code for the list:

<List id="list" items="{ path: '/GewerkSet', sorter: { path: 'ZTradeName', descending: false }, groupHeaderFactory: '.createGroupHeader' }" busyIndicatorDelay="{masterView>/delay}" noDataText="{masterView>/noDataText}" mode="{= ${device>/system/phone} ? 'None' : 'SingleSelectMaster'}" growing="true" growingScrollToLoad="true" updateFinished="onUpdateFinished" selectionChange="onSelectionChange">
<infoToolbar>
    <Toolbar active="true" id="filterBar" visible="{masterView>/isFilterBarVisible}" press="onOpenViewSettings">
        <Title id="filterBarLabel" text="{masterView>/filterBarLabel}"/>
    </Toolbar>
</infoToolbar>
<items>
    <ObjectListItem type="{= ${device>/system/phone} ? 'Active' : 'Inactive'}" press="onSelectionChange" title="{ZTradeName}" showMarkers="true"/>
</items>
</List> 

And here is a picture of what I need. Please note the checkbox in front of the List item:

enter image description here




Aucun commentaire:

Enregistrer un commentaire