How to add 'widgets' to the view?


Hello! This is a really common case of a ‘report builder’ and I suspect that I’m not getting how to do it right :frowning: Here is the thing : imagine a two column page, left side of which contains a panel with buttons and right side is the main working area. By clicking on the button user can add a widget to the main area. Also he can delete it. I assume that every widget is the differwnt view with its own events.

As for now I created a separate CollectionView which is insreted in the template and when user clicked I want to get it in the controller, create new widget and add him via .pushObject on the view. This is possible but seems to complicated.

Here is a jsbin with a reproduction of the case