on 01-24-2021 7:28 AM
Hey,
i'm trying to apply a filter after clicking on a sap.m.Table row.
I click on the row and save a variable of that row in a global attribute.
Then i navigate to another view, that view has another sap.m.Table which i want to filter with the variable i just saved.
Here is my method:
onBeforeRendering: function () {
Log.info('---------------------------');
Log.info($.masterID);
Log.info('---------------------------');
var aTableSearchState = [];
var sQuery = $.masterID;
if (sQuery && sQuery.length > 0) {
aTableSearchState = [new Filter("master_id", FilterOperator.Contains, sQuery)];
}
var oTable = this.byId("table");
oTable.getBinding("items").filter(aTableSearchState, "Application");
Its giving me the right variable in $.masterID but the filter doesn't work at all
Thanks in advance for any reply!
:
instead of onbeforerendering, do it in the attachMatched event handler, you can check the example below:
https://ui5.sap.com/#/topic/f96d2522a5ca4382a274ae3c6d002ca0
-Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.