Data model loading

Hi,
I use Webix Jet and
I defined a data collection loaded from url like this:

define([
    "app",
    "models/licensingInfo",
], function (app, lic) {

the licensingInfo model is defined as

define(["app"], function (app) {
    var collection = new webix.DataCollection({
        url: "/api/licensing"
    });

    collection.attachEvent("onAfterLoad", function () {
        app.callEvent("licensingInformationLoaded", [collection]);
    })

    return {
        data: collection
    };
});

When I load the page first time, the model loaded. But if I go to another page (by menu) and return back, the collection of data is empty. So I decided to force it to load in $oninit() function. But in this case the collection loaded twice when I go to the page first time.

I suspect that my solution isn’t good. So how to load the data defined in module every time when page is shown?

Hello,

The code works correctly from my side. I have tried the following actions in view and each time collection data is parsed and logged well:

$oninit:function(view){
   view.parse(lic.data);
   console.log(lic.data.data.pull);
}

Could you please double check and share the code of your view?

Btw, the new version of Jet is available. Do you use the old one or has migrated to the new one (it supports old configurations)?