Skip to Content
0

How to change the text "Go" in Smart Filter Bar to "Find" ?

Sep 13, 2017 at 08:43 AM

337

avatar image
Former Member

Hi,

I want to change the text "Go" in Smart Filter Bar to "Find" and add a icon there. Also i want to know which event triggers when clicked on Go button and how do i handle it.

smartfilterbar.png

smartfilterbar.png (24.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Joseph BERTHE Sep 13, 2017 at 06:40 PM
0

Hello,

It is not possible (for the moment) to do it in Standard way. But here is how I found to handle it.

Put this code in onInit function of the view:

var oFilter = this.getView().byId("idSmartFilter");      
oFilter.setShowGoOnFB(false);
oFilter.addEventDelegate({
      "onAfterRendering": function(oEvent) {
                            var oContents = oEvent.srcControl._oToolbar.getContent();
                            if (oContents.length > 7) {
                              // Search area
                                var oButton= oContents[???];  // I let you find the index corresponding to the GO button
                                oButton.setText(that._oBundle.getText("inputSearchPlaceholder"));
                            }
                        }
                    });

With the debug you will be able to find the correct UI Control ;)

Share
10 |10000 characters needed characters left characters exceeded
Guilherme Cardoso Apr 02 at 08:22 PM
0

Hello,

it seems that _oToolbar is deprecated.

However, you can do it easily by getting _oSearchButton instance:

var oFilter = this.getView().byId("objectFilter"),
				that = this;
				
			oFilter.addEventDelegate({
				"onAfterRendering": function(oEvent) {
					var oResourceBundle = that.getOwnerComponent().getModel("i18n").getResourceBundle();


					var oButton = oEvent.srcControl._oSearchButton;
					oButton.setText(oResourceBundle.getText("goButton"));
				}
			});
Share
10 |10000 characters needed characters left characters exceeded