简体   繁体   English

sapui5将参数传递给smartFilterBar ControlConfiguration的值帮助对话框

[英]sapui5 pass parameter to value help dialog of smartFilterBar ControlConfiguration

I have SmartFilterBar on my page based on oData service. 我在基于oData服务的页面上有SmartFilterBar。 One of filterable fields has value help dialog. 可过滤字段之一具有“值帮助”对话框。 When value help dialog opened i need to fill one of search parameters in this value help dialog. 当值帮助对话框打开时,我需要在该值帮助对话框中填写搜索参数之一。 How can i do this? 我怎样才能做到这一点? I can't get value help dialog by control because "byId() method" i don't now id of created dialog. 我无法通过控件获得价值帮助对话框,因为“ byId()方法”现在不是所创建对话框的ID。

I found the solution: how can I get id of opened valuehelpdialog: In the event "onValueHelpRequest" of I redigine "onAfterRendering" method of class "sap.ui.comp.valuehelpdialog.ValueHelpDialog" and in this method I can get the id of the dialog: 我找到了解决方案:如何获取打开的valuehelpdialog的ID:在事件“ onValueHelpRequest”的情况下,我重新分配了“ sap.ui.comp.valuehelpdialog.ValueHelpDialog”类的“ onAfterRendering”方法,在此方法中,我可以获取对话框:

filterInitialize: function() {
    var oDogovorControl = this.getView().byId("smartFilterBar").getControlByKey("Dogovor");
    oDogovorControl.attachValueHelpRequest(this.onValueHelpRequest, this);
},
onValueHelpRequest: function() {
    sap.ui.comp.valuehelpdialog.ValueHelpDialog.prototype.test = sap.ui.comp.valuehelpdialog.ValueHelpDialog.prototype.onAfterRendering;
    var fntest2 = function(oEvent){
                      this.test();
                      console.log(this.getId());
                    };
    sap.ui.comp.valuehelpdialog.ValueHelpDialog.prototype.onAfterRendering = fntest2;
}

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

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