Monday, 16 March 2015



I've just watched this interesting video covering some Fiori/UI5. The new features in the 1.28 release are talked about as well as a look at the "Fiori Apps Reference Library" page located here.

The guys discussed adding the ability to filter on the release date or wave so after a bit of quality time in the Chrome Dev tools here is my solution:

1. Open the URL https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/#/detailInfo and get  the dev tools panel open.

2. Open the "Sources" tab in Dev tools and open the file S2.controller.js. Stick a breakpoint at line 383. When we hit the filter button we'll stop here and have a reference to the Filter Dialog so we can insert our new filter item for the Release date.


3. Paste the following javascript into the prompt on the "Console" tab:

//add new item to filter
var filterTemplate = new sap.m.ViewSettingsItem({key: "releaseName___EQ___{externalName}", text: "{externalName}"});
var filterItem = new sap.m.ViewSettingsFilterItem("F7", {text: "Release"});
filterItem.bindAggregation("items", {path: "/Releases_EV" , template: filterTemplate});
this._oFilterDialog.addFilterItem(filterItem);
//fix bug where filters are not being reset
this.oldFunction = this.onFilterPressed;
var newFunction = function(oEvent){ this.oldFunction(oEvent);this.getList().getBinding('items').aFilters = []; };
this.onFilterPressed = newFunction;
view raw gistfile1.js hosted with ❤ by GitHub



This should add a new item to the filters with the Release dates, there seems to be a bug where the filters are not getting cleared out so I've patched the function to fix that. God bless Chrome Dev tools and all who sail in her!