Search code examples
filtercross-applicationsapui5

Auto click on "GO" in smartfilter bar


i am doing cross application navigation from App 1 to another application by passing parameters.

in target application i have Smart Filter bar. i am filtering using "beforeRebindTable" event in smart Table.

my requirement is while i am navigating to target application i want smart Filter bar's "GO" button gets clicks automatically. so that i can view my filtered data on Smart Table without clicking anything.

regards, Urvish

i have tried

this._oFilterBar._oSearchButton.sId.click() in onInit();

but it is giving me an error.

 var b = E.getParameter("bindingParams");
 if (this.onCreate().InspectionLot[0] != "" || this.onCreate() != "")
 {
 var oFilter = new sap.ui.model.Filter("InspectionLot", 
 sap.ui.model.FilterOperator.EQ, this.onCreate().InspectionLot[0]);
 b.filters.push(oFilter);
 }

Solution

  • you can enable the automatic data request in the smarttable by using the property

    enableAutoBinding="true"
    

    you can also rebind the Table in the on route matched event

    thisgetView().byId("YourSmartTable").rebindTable();