点击此处---> 群内免费提供SAP练习系统(在群公告中)
加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)
UI5版本:1.63.1
sap.ui.define([ " sap/ui/core/mvc/Controller" ," sap/ui/comp/valuehelpdialog/ValueHelpDialog" ," sap/ui/model/json/JSONModel" ," sap/m/ColumnListItem" ," sap/ui/core/Fragment" ," sap/ui/table/Table" ],函数(Controller,ValueHelpDialog,JSONModel,ColumnListItem,Table,Fragment){ "使用严格"; return Controller.extend(" cap.molex.Molex1_selfcodedProtoype.controller.CreateRequest",{ onInit:函数(){ var oModel = new JSONModel(" ./model/mockData/valueHelpData.json"); this.getView()。setModel(oModel); }, getById:函数(编号){ 返回this.getView()。byId(Id); } ,onWarehouseHelp:function(){ 如果(!this._oValueHelpDialog){ Fragment.load({ 名称:" cap.molex.Molex1_selfcodedProtoype.fragment.valueHelp", 控制器:这个 })。then(function(oValueHelpDialog){ this._oValueHelpDialog = oValueHelpDialog; this.getView()。addDependent(this._oValueHelpDialog); this._configValueHelpDialog(); this._oValueHelpDialog.open(); } .bind(this)); }其他{ this._configValueHelpDialog(); this._oValueHelpDialog.open(); } } ,_configValueHelpDialog:function(){ var sInputValue = this.byId(" inWarehouse")。getValue(), oModel = this.getView()。getModel(), aWarehouses = oModel.getProperty("/img/Warehouses"); aWarehouses.forEach(function(oWarehouse){ oWarehouse.selected =(oWarehouse.Name === sInputValue); }); oModel.setProperty("/img/Warehouses",aWarehouses); }
您的表和片段导入被反转;)
嗨,艾德温,
您定义的导入不正确。 如果您观察进口的顺序
其中的分配是
从技术上讲,您将函数加载在表而不是在片段上。
您只需要更正导入或分配的顺序即可。
谢谢
芦苇
一周热门 更多>