自定义搜索字段属性以自定义文本 "No Data"

Custom Searchfield properties to customize the text "No Data"

我使用 XML 在 SAPUI5 中创建了一个搜索字段。

搜索字段工作正常,但每当我输入无效的搜索值时,它 returns "No Data" 都是正确的。

我想编辑 "No Data" 短语并将其自定义为我自己的短语,如下所示:"No info returned for this search"

我如何完成它?下面是我当前的代码。

    <Searchfield>
    search ="searchMethod"
    width = "100%"
    id = "doSearch"
    </searchfield>

控制器中onInit()onDataLoaded()

this.byId("yourListId").setNoDataText("No info returned for this search");

或者在XML中你可以设置

<List noDataText="No info returned for this search" />