I want to create a multiview. In each of the 9 views data will be loaded from the server (into datatables). I can’t find any examples of how to structure my application around this principle.
Do I need to hook into the viewchange-event to load the data myself and just make sure my views are already in place? I want to prevent that each of the 9 views starts loading the data at the same time. Ideally, the data would only load when navigating to that specific view.
Also, should I worry that the data stays in memory when I’ve navigated 9 different views?
You use onViewChange event and use data.load api from it, to start data loading
In most complex case, you can use an empty views and not only load data but create all UI from onViewChange event as well. To minimize micromanagement, you can use Webix Jet, that was designed exactly for such kind of task. It will render the visible screen and will destroy hidden views automatically.
Webix Jet looks interesting. Thank you. However, for now, trying to build my first Webix project is enough of a challenge. Introducing Jet would make things more complex for me.
I’ll try to see if I can manage with the onViewChange event.
Does that mean that with Webix Jet all data is “renew-ed” when i click the menu on the left?
Of example if im on one “view 1” and then do something here (select something, scroll, filter, type some text into form fields etc) and then click a different menu item on the left…and then again click the “view 1” item in menu.
Is there a way to preserve the “state” of views with Webix Jet?