SAPUI5文本不显示在选择器中

SAPUI5文本不显示在选择器中,sapui5,selector,Sapui5,Selector,我阅读了文档,想在代码中创建一个选择器 我仔细阅读了文档,但没有显示文本。 在我的XML文件中: <Select selectedKey="{test>/SelectedProduct}" items="{ path: 'test>/ProductCollection', sorter: { path: 'Name' } }">

我阅读了文档,想在代码中创建一个选择器

我仔细阅读了文档,但没有显示文本。 在我的XML文件中:

<Select
        selectedKey="{test>/SelectedProduct}"
        items="{
           path: 'test>/ProductCollection',
           sorter: { path: 'Name' }
        }">
        <core:Item key="{test>/SelectedProduct/ProductId}" text="{test>/SelectedProduct/Name}" />
</Select>
它不显示文本,但显示数组的元素数

我还尝试:

    <Select
        selectedKey="{test>/SelectedProduct}"
        items="{
           path: 'test>/ProductCollection',
           sorter: { path: 'Name' }
        }">
        <core:Item key="{test>/ProductCollection/ProductId}" text="{test>/ProductCollection/Name}" />
    </Select>
以及:

为什么此解决方案不能按预期工作?

项目绑定路径中不需要ProductCollection。项目路径已在选择中设置为ProductCollection

<core:Item key="{test>ProductId}" text="{test>Name}" />
<Select
    selectedKey="{test>/SelectedProduct}"
    items="{
       path: 'test>/ProductCollection',
       sorter: { path: 'Name' }
    }">
    <core:Item key="{test>/ProductCollection.ProductId}" text="{test>/ProductCollection.Name}" />
</Select>
<core:Item key="{test>ProductId}" text="{test>Name}" />