on 11-30-2016 2:28 AM
Hello All,
I am getting which works fine, only after page is loaded
this.getOwnerComponent().getModel("tiles").getProperty("/d/results");
But I am getting a undefined when using the same code in oInit() or afterRendering() methods. Surprisingly(to me, atleast) is not null and oData can be seen in the oModel object in console
this.getOwnerComponent().getModel("tiles");
What's ur code to load that json?
make it synchronous
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As I understand, Model is not yet loaded with data during onInit and afterRendering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As you can see, this is the console output of the below code in onInit
this.getOwnerComponent().getModel("tiles");
But when I use the below code, its returning null in onInit
this.getOwnerComponent().getModel("tiles").getProperty("/d/results");
Also from the below network console, you can see that the models are loaded and then only the view controllers are loaded.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.