简体   繁体   中英

sapui5 pass parameter to value help dialog of smartFilterBar ControlConfiguration

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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