SAPUI5 Walkthrough Step 25: Sorting and Grouping

 
 排序和分组
 
 修改 webapp/view/InvoiceList.view.xml 文件
<mvc:View xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc" controllerName="sap.ui.demo.walkthrough.controller.InvoiceList">
    <List id="invoiceList" headerText="{i18n>invoiceListTitle}" class="sapUiResponsiveMargin" width="auto" 
        items="{
            path : 'invoice>/Invoices',
            sorter : {
                path : 'ShipperName',
                group : true
            }
        }">
      <headerToolbar>
         <Toolbar>
            <Title text="{i18n>invoiceListTitle}"/>
            <ToolbarSpacer/>
            <SearchField width="50%" search=".onFilterInvoices"/>
         </Toolbar>
      </headerToolbar>
        <items>
......
        </items>
    </List>
</mvc:View>

执行

 

 源代码

 

 

posted @ 2021-08-04 18:36  客于溟  阅读(83)  评论(0)    收藏  举报