最新的SAPUI5更新1.56.5

时间:2018-09-04 08:54:40

标签: combobox sapui5

我升级到SAPUI5 - 1.56.5的最新版本,并且Combobox中的ListItemTemplate停止工作。尽管下拉列表的长度等于应该显示的项目数,但是下拉列表中没有显示文本。

   var formatterItemTemplate = function (myText) {
       return myText.toUpperCase());
   };

   var oItemTemplate = new ListItem({
     key: "{CityId}",
     text: {
       path: 'Address/CityName',
       formatter: formatterItemTemplate
     }
   });

   var oComboBox = oCore.byId('MyComboBox');
   oComboBox.bindItems({
      path: "/Companies/FetchCompanyBasedonCity" + "(CompanyCode='" +oModelData.CompanyCode + "',CityId=" +oModelData.CityId+ ")",",
      template: oItemTemplate,
      templateShareable: true,
      parameters: {
          $expand: 'Address'
      },
   });

请注意,path属性中的FetchCompanyBasedonCity是.NET中实现的自定义函数,它会根据参数返回公司列表。

即使我删除了格式化程序并仅按如下所示分配文本,下拉列表中的文本也不会填充。

  var oItemTemplate = new ListItem({
      key: "{CityId}",
      text: "{Address/CityName}"
  });

如果我恢复到以前使用的版本1.54.3,则一切正常。任何想法为什么相同的代码在新的SAPUI5版本1.56.5中不起作用

0 个答案:

没有答案