sapui5 将参数传递给 smartFilterBar ControlConfiguration 的值帮助对话框 [英] sapui5 pass parameter to value help dialog of smartFilterBar ControlConfiguration

查看:101
本文介绍了sapui5 将参数传递给 smartFilterBar ControlConfiguration 的值帮助对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的页面上有基于 oData 服务的 SmartFilterBar.可过滤字段之一具有值帮助对话框.当值帮助对话框打开时,我需要在此值帮助对话框中填写搜索参数之一.我怎样才能做到这一点?我无法通过控件获取值帮助对话框,因为byId() 方法"我现在没有创建对话框的 ID.

I have SmartFilterBar on my page based on oData service. 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.

推荐答案

我找到了解决方案:如何获取已打开的 valuehelpdialog 的 id:在我重新设计类sap.ui.comp.valuehelpdialog.ValueHelpDialog"的onAfterRendering"方法的onValueHelpRequest"事件中,我可以获得对话框的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:

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;
}

这篇关于sapui5 将参数传递给 smartFilterBar ControlConfiguration 的值帮助对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆