简体   繁体   English

需要帮助以在SAP UI5的值帮助的新闻事件中找到动态创建的输入控件的ID

[英]Need Help to find id of dynamically created input control in the press event of value help in sap ui5

I am new to SAP UI5 and fiori , I have created one UI5 application with functionality to add new Input field dynamically on the click of a button and I have attached the value help request with the Input field. 我是SAP UI5和fiori的新手,我创建了一个具有UI5功能的UI5应用程序,该功能可以在单击按钮时动态添加新的Input字段,并且将value help请求附加到Input字段。 For the value help I am using sap.m.SelectDialog . 为了获得价值帮助,我正在使用sap.m.SelectDialog Now how to get the ID of input control in the confirm even of Select Dialog. 现在,如何在选择对话框的确认中获取输入控件的ID。 I tried using oEvent.getSource() in confirm event but it did not work. 我尝试在确认事件中使用oEvent.getSource() ,但无法正常工作。 pls help... 请帮助...

You can try either below, depend on which type of rows/items using in your binding 您可以尝试以下任一方法,具体取决于绑定中使用的行/项目类型

It will return the value in the input field 它将在输入字段中返回值

 // 1 var oSource = oEvent.getSource(); var oBarContent = oSource.getContent(); var oToolBarContent = oBarContent[0].getContent(); var oSearch = oToolBarContent[1]; var sQuery = oSearch.getValue().toUpperCase(); // 2 var sQuery = oEvent.getParameter("query"); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM