How to Access to the id field to perform lazyLoad Function #103
gioisco
started this conversation in
Show and tell
Replies: 2 comments 2 replies
-
Native node members are |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thank you for the contribution, I appreciate your support! There is already a related demo here (source code). How about starting to use the discussion category "Show and tell" for real-world solutions that we publicly share? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to show you how to use lazyLoad for load children by id (with AJAX call).
I created a simple REST API that return the following data (the children of node root /):
I would like to call my other REST API at
/json/{id}
, with id=9, to retrieve the contents of directorydir1
.In this example, I successfully called my REST API because I accessed
e.node.data.id
and note.node.id
, which is undefined.This is because native node members are identified by
node.key
andnode.refKey
, and all other properties are added undernode.data
, e.g.,node.data.id
.Following is a complete example with a simulation of an AJAX call:
Beta Was this translation helpful? Give feedback.
All reactions