0 Replies Latest reply on Oct 27, 2008 4:48 AM by (jvsietsma)

    Where to place groupingcollection.refresh() in Cairngorm design?

      I wonder where to place the functionality to refresh a groupingcollection, in an advanceddatagrid, inside the Cairngorm framework?

      Situation:
      I have an advanceddatagrid with a groupingcollection for displaying product data. When the application is initialized, the getProductsEvent is dispatched. This will invoke the getProductsCommand wich will invoke getProductsDelegate. The delegate gets the data from the server and the command (wich implements the IResponder interface) will transform the data into an ArrayCollection and assign it to ShopModelLocator.getInstance().products.

      Problem:
      The problem is that the view (AdvancedDataGrid) is not updated after model.products is changed. To do this, you have to invoke GroupingCollection.refresh().

      Question:
      The model doens't need to know the view. So invoke GroupingCollection.refresh() from the getProductsCommand is not an option. What is the best location to implement the logic that refreshes the groupingCollection? What is best practise?