2016-12-15 10 views

答えて

1

このSAPUI5 Explored Sample: P13nDialog with disabled 'Filter' tab - Variationに示すように、あなたはcustomData経由SmartTableの組み込みP13nDialogからフィルタ(および他のすべてのオプション)を削除することができます。

SmartTableWithoutFilterOption.view.xml

<core:View xmlns:core="sap.ui.core" xmlns="sap.ui.comp.smarttable" 
    xmlns:html="http://www.w3.org/1999/xhtml" 
    xmlns:customData="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1" 
    controllerName="my.namespace.SmartTableWithoutFilterOption"> 

    <SmartTable 
     tableType="ResponsiveTable" header="A bunch of data" 
     enableAutoBinding="true" entitySet="RecordSet" 
     customData:p13nDialogSettings='{filter:{visible:false}}' /> 
</core:View> 

あなたはcustomData:p13nDialogSettingsプロパティが機能するxmlns:customData名前空間を宣言する必要があることに注意してください。

ただし、customDataアグリゲーション表記を長く使用することもできます。他のオプションを非表示にする

SmartTableWithoutFilterOptionLongNotation.view.xml

<core:View xmlns:core="sap.ui.core" xmlns="sap.ui.comp.smarttable" 
    xmlns:html="http://www.w3.org/1999/xhtml" 
    controllerName="my.namespace.SmartTableWithoutFilterOptionLongNotation"> 

    <SmartTable 
     tableType="ResponsiveTable" header="A bunch of data" 
     enableAutoBinding="true" entitySet="RecordSet"> 
     <customData> 
      <core:CustomData 
       key="p13nDialogSettings" 
       value='\{ 
        "filter": \{ "visible": false} 
       }' /> 
     </customData> 
    </SmartTable> 
</core:View> 

ではなくfiltercolumnssortまたはgroupを使用しています。 これらの設定を組み合わせて、複数のオプションを非表示にすることもできます。次のコードはフィルタリングのみを許可します。

<core:CustomData 
    key="p13nDialogSettings" 
    value='\{ 
     "columns": \{ "visible": false}, 
     "sort": \{ "visible": false}, 
     "group": \{ "visible": false} 
    }' /> 
関連する問題