Выбор нескольких строк в смарт-таблице

#sapui5

#sapui5

Вопрос:

Я не могу найти какое-либо свойство, которое может помочь выполнить множественный выбор строк в SmartTable .

Я работал с простыми таблицами. Там свойство mode="MultiSelect" решает эту проблему, но в SmartTable это не работает.

Пожалуйста, предложите мне свойство, которое можно использовать для выбора нескольких строк в SmartTable

 <mvc:View xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc" controllerName="Workspace.controller.SmartField"
xmlns:smartFilterBar="sap.ui.comp.smartfilterbar" xmlns:smartTable="sap.ui.comp.smarttable">
    <smartFilterBar:SmartFilterBar id="smartFilterBar" entitySet="PLANT" persistencyKey="SmartFilter_Explored">
        <smartFilterBar:controlConfiguration>
            <smartFilterBar:ControlConfiguration key="PLANTID" visibleInAdvancedArea="true" preventInitialDataFetchInValueHelpDialog="false"> </smartFilterBar:ControlConfiguration>
            <smartFilterBar:ControlConfiguration key="STATUS" visibleInAdvancedArea="true" preventInitialDataFetchInValueHelpDialog="false"> </smartFilterBar:ControlConfiguration>
        </smartFilterBar:controlConfiguration>
    </smartFilterBar:SmartFilterBar>
    <OverflowToolbar design="Transparent">
        <ToolbarSpacer/>
        <OverflowToolbarButton icon="sap-icon://add"  text="Add" press="AddRow"/>
        <OverflowToolbarButton icon="sap-icon://delete" text="Delete" press="Delete"/>
        <OverflowToolbarButton icon="sap-icon://drop-down-list" text="Filter"/>
    </OverflowToolbar>
    <smartTable:SmartTable id="tableplant" smartFilterId="smartFilterBar" tableType="ResponsiveTable" editable="false" entitySet="PLANT"
      initiallyVisibleFields="PLANTID,PTYPE,DESCRIPTION,TYPE,STATUS,ASSIGNED,ATTACHMENT" useVariantManagement="false"  demandPopin="true" 
      useTablePersonalisation="true" header="Products" showRowCount="true" useExportToExcel="false" enableAutoBinding="true"></smartTable:SmartTable>
</mvc:View>
  

Ответ №1:

если вы хотите использовать множественный выбор, вы могли бы интегрировать sap.m.Table в свою smarttable:

 <smartTable:SmartTable id="tableplant" smartFilterId="smartFilterBar" tableType="ResponsiveTable" editable="false" entitySet="PLANT"
      initiallyVisibleFields="PLANTID,PTYPE,DESCRIPTION,TYPE,STATUS,ASSIGNED,ATTACHMENT" useVariantManagement="false"  demandPopin="true" 
      useTablePersonalisation="true" header="Products" showRowCount="true" useExportToExcel="false" enableAutoBinding="true">

<!--  Table integration -->
    <Table mode="MultiSelect" growingThreshold="100" growing="true" 
     growingScrollToLoad="true">
        <columns>
        ...
        </columns>
        <items>
        ...
        </items>
     </Table>
<!--  EndTable integration -->

</smartTable:SmartTable>