pentaho/pentaho-platform — pull request #1317 by apratkin (2014-03-14 08:50:55+00:00)
Title: BISERVER-10586

IE Browse Perspective - Empty the Trash is enabled when nothing in the Trash, clicking it will give an error.

Add functionality to clear entry collector cache since it contains old data before empty trash.

In case we abort request for retrieving list of files and use value from cache we need to call function to disable trash button (if necessary). As it works in case we send ‘real’ request. Event listener, which calls retrieving list of files (with request or from cache) need to be run after listener, which enable all buttons:
this.model.on("change:clickedFolder", this.checkButtonsEnabled, this); //should be first
myself.fileBrowserModel.on("change:clickedFolder", myself.fileBrowserModel.updateFileList, myself.fileBrowserModel); // finally it invokes: FileBrowser.fileBrowserModel.get("trashButtons").onTrashSelect(true); - should be second

We need to force trigger event in case parameters (path, data) were not changed