【发布时间】:2022-10-08 07:11:14
【问题描述】:
我使用 Ui5 的类过滤栏开发了一个带有项目列表和搜索功能的 ui5 页面。该框架自动为触发搜索的按钮定义一个文本,并为在搜索栏中默认显示的文本定义一个文本。
我想对其进行自定义,以便更好地控制其内容并使用 i18n 设置进行更好的多语言管理。我该如何进行这种定制?我查看了 SDK 文档,但它没有提到我可以轻松进行此更改的属性。
跟随一段代码来实现这部分视图。
<Label/>
<fb:FilterBar id="filterBar" search="onSearch" showRestoreButton="false" showClearButton="true" showFilterConfiguration="false">
<fb:filterGroupItems>
<fb:FilterGroupItem groupName="__$INTERNAL$" name="A" label="{i18n>workstreamsOptions}" partOfCurrentVariant="true" visibleInFilterBar="true">
<fb:control>
<ComboBox id="WorkStreamCombobox" change="onChange">
<items>
<core:Item key="001" text="{i18n>ws1}" />
<core:Item key="002" text="{i18n>ws2}" />
<core:Item key="003" text="{i18n>ws3}" />
<core:Item key="004" text="{i18n>ws4}" />
<core:Item key="005" text="{i18n>ws5}" />
<core:Item key="006" text="{i18n>ws6}" />
<core:Item key="007" text="{i18n>ws7}" />
<core:Item key="008" text="{i18n>ws8}" />
<core:Item key="009" text="{i18n>ws9}" />
</items>
</ComboBox>
</fb:control>
</fb:FilterGroupItem>
<fb:FilterGroupItem groupName="__$INTERNAL$" name="B" label="{i18n>typeOfInterface}" labelTooltip="Tooltip Example" partOfCurrentVariant="true" visibleInFilterBar="true">
<fb:control>
<ComboBox id="TypeCombobox" change="onChange">
<items>
<core:Item key="001" text="{i18n>typeInbound}" />
<core:Item key="002" text="{i18n>typeOutbound}" />
<core:Item key="003" text="{i18n>typeNotClassified}" />
</items>
</ComboBox>
</fb:control>
</fb:FilterGroupItem>
</fb:filterGroupItems>
</fb:FilterBar>
【问题讨论】: