Sapui5 智能筛选栏不显示
我尝试使用以下方法:Sapui5 智能筛选栏不显示,sapui5,Sapui5,我尝试使用以下方法: <VBox fitContainer="true"> <smartFilterBar:SmartFilterBar id="JobProfileOverviewFilter" entitySet="ProfileSet"> <smartFilterBar:controlConfiguration> <smartFilterBa
<VBox fitContainer="true">
<smartFilterBar:SmartFilterBar id="JobProfileOverviewFilter" entitySet="ProfileSet">
<smartFilterBar:controlConfiguration>
<smartFilterBar:ControlConfiguration key="Item"></smartFilterBar:ControlConfiguration>
</smartFilterBar:controlConfiguration>
<smartFilterBar:layoutData>
<FlexItemData shrinkFactor="0"/>
</smartFilterBar:layoutData>
</smartFilterBar:SmartFilterBar>
<smartTable:SmartTable id="JobProfileOverview" entitySet="ProfileSet" tableType="ResponsiveTable" useTablePersonalisation="true"
showRowCount="true" enableAutoBinding="true" smartFilterId="JobProfileOverviewFilter" header="Business profiles"
class="sapUiResponsiveContentPadding" app:useSmartToggle="true">
<smartTable:customToolbar>
<OverflowToolbar design="Transparent">
<ToolbarSpacer/>
<OverflowToolbarButton icon="sap-icon://order-status" tooltip="Order status" text="Order status" press="onStatus"/>
</OverflowToolbar>
</smartTable:customToolbar>
<!-- layout data used to make the table growing but the filter bar fixed -->
<smartTable:layoutData>
<FlexItemData growFactor="1" baseSize="0%"/>
</smartTable:layoutData>
<Table mode="MultiSelect"></Table>
</smartTable:SmartTable>
</VBox>
问题是,过滤器没有出现在屏幕上。
元数据中的剪切:
<EntityType Name="Profile" sap:content-version="1">
<Key>
<PropertyRef Name="ItemId"/>
</Key>
<Property Name="Item" Type="Edm.String" Nullable="false" MaxLength="300" sap:unicode="false" sap:label="Role" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Connector" Type="Edm.String" Nullable="false" MaxLength="32" sap:unicode="false" sap:label="System" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Descn" Type="Edm.String" Nullable="false" sap:unicode="false" sap:label="Description" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="ValidFrom" Type="Edm.DateTime" Nullable="false" Precision="7" sap:unicode="false" sap:label="Valid From"
sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="ValidTo" Type="Edm.DateTime" Nullable="false" Precision="7" sap:unicode="false" sap:label="Valid To" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Status" Type="Edm.String" Nullable="false" MaxLength="8" sap:unicode="false" sap:label="Expiration Status"
sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Selected" Type="Edm.String" Nullable="false" MaxLength="1" sap:unicode="false" sap:label="Boolean" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="ItemId" Type="Edm.String" Nullable="false" MaxLength="50" sap:unicode="false" sap:label="Object ID" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="ItemType" Type="Edm.String" Nullable="false" MaxLength="6" sap:unicode="false" sap:label="Item Type" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
</EntityType>
<EntitySet Name="ProfileSet" EntityType="YGAC_ACCESS_MANAGER_SRV.Profile" sap:creatable="false" sap:updatable="false" sap:deletable="false"
sap:pageable="false" sap:content-version="1"/></EntityContainer>
我做错了什么
更新
我现在已经启用了过滤器
但它不会出现在SmartFilter中:
我必须在过滤器选项中启用它:
为什么筛选字段不显示为默认值?尝试添加其他参数,例如:
<smartFilterBar:ControlConfiguration
key="Item"
mandatory="auto"
preventInitialDataFetchInValueHelpDialog="false"
visibleInAdvancedArea="true"
controlType="auto"
displayBehaviour="idAndDescription"
label="Item"
index="1"></smartFilterBar:ControlConfiguration>
xml在我看来很好。您是通过SEGW或CD创建服务的?如果SEGW设置sap:filterable=“true”并重试。(您可以在segw中执行此操作)我已更新了您的smartfilterbar所需的批注。例如,在xy位置显示过滤器xy。当不使用CD时,我更喜欢在webide中创建本地注释。搜索如何使用的教程