AnsweredAssumed Answered

How to reload multiple Alfresco.util.DataTable in the same page using filterChanged event

Question asked by douglascrp Moderator on Jul 19, 2017

I am working on adding the out of the box workflow tasks filters inside the managees tasks page in the alvex-manager-dashboard-tasks

The work I have done so far is available at  filters by douglascrp · Pull Request #15 · ITDSystems/alvex-manager-dashboard-tasks · GitHub 


As you can see in the PR's comment, I am facing a problem where only the first DataTable is reloaded when I change the filter (clicking in the links).


The way this page works is simple, with one call for the tasks-intances webscript for each user in the managees array.

When the page is first loaded, if you use the browser's network monitor, it is possible to see the same number of webscripts calls as the number of managees, but when the filter is changed, only one call is shown, and that is exactly for the first item in the managees array.


This seems to be the single place where the filterChanged event is registered

alvex-manager-dashboard-tasks/managees-tasks-view.js at tasks_filters · douglascrp/alvex-manager-dashboard-tasks · GitHu… 


Some information I found about the DataTable: Share Client-side API - Alfresco.util.DataTable 

* Loads state form url and fires from "filter" state and uses "paging" state to create paginated datasource url 
- Filters 
- Listens for "changeFilter" events, puts them as browser history state and reloads datatable when the state has changed 


Any idea on how to force all the DataTables to be refreshed?


Thank you in advance.