on 10-21-2016 9:14 AM - last edited on 02-04-2024 7:05 AM by postmig_api_4
Hi SAPUI5 developers,
I made a Firori Worklist project inside of WebIDE. I connected it to an OData server and selected SAPUI version 1.38 as default.
It shows the worklist correctly and I can press on items and move between views and visit the object especially.
So everything seems to work fine.
The only thing that is not working is the search box. Its event is triggered whenever I type something inside it and press enter, but it does not filter anything.
The functions that are called are as follow:
onSearch: function(oEvent) {
if (oEvent.getParameters().refreshButtonPressed) {
// Search field's 'refresh' button has been pressed.
// This is visible if you select any master list item.
// In this case no new search is triggered, we only
// refresh the list binding.
this.onRefresh();
} else {
var oTableSearchState = [];
var sQuery = oEvent.getParameter("query");
if (sQuery && sQuery.length > 0) {
oTableSearchState = [new Filter("ZBrandName", FilterOperator.Contains, sQuery)];
}
this._applySearch(oTableSearchState);
}
},
/**
* Internal helper method to apply both filter and search state together on the list binding
* @param {object} oTableSearchState an array of filters for the search
* @private
*/
_applySearch: function(oTableSearchState) {
var oTable = this.byId("table"),
oViewModel = this.getModel("worklistView");
console.log(oTable);
oTable.getBinding("items").filter(oTableSearchState, "Application");
// changes the noDataText of the list in case there are no filter results
if (oTableSearchState.length !== 0) {
oViewModel.setProperty("/tableNoDataText", this.getResourceBundle().getText("worklistNoDataWithSearchText"));
}
},
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.