on 02-24-2019 5:36 PM
Hi all,
i got a model which was load in the component.js.
The model:
When I load the model in the controller.js is looks like:
As I want to insert a new entry I would like to read the property
var oProperty = oModel.getProperty("/Nodes");
But oProperty is undefined if I use this. Waht am I doing wrong?
Many Thanks
Regards
Mario
Hi Mario Mueller,
Nodes.json is the file name and inside the file you have array of data. So the model is created and will be set with the data from that json model and it will not take the file name.
var oArray = oModel.getProperty("/");
You can also fetch the data like: oModel.getData()
If your data is in the below format then your code will work..
{
Nodes : [{..},{..}]
}
BR,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mahesh,
great work!! Thanks a lot.
Regards
Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.