Lazy load, update, create and delete dijit tree items
The root of the tree (images) is loaded with a GET request on page load. When the users expands a folder, a new GET request is issued to fetch its contents and the response is cached. Creating/deleting a tree item will revert all changes in the tree, because the JsonRestStore sends a GET first and the server response does not contain these previous changes (in this demo they are simply not implemented. The server just sends a 200 or 500.
This demo belongs to part 1 of the tutorial: REST with Dojo and PHP.
Demo of creating, modifying and deleting tree items lazily.
- POST: create new item 6 as child of node 5 (TODO: fix icon, which is not updated)
- GET: load data of item 1
- PUT: rename tree item 2
- DELETE: delete item 3
Download the zipped demo file of part 1 dojo-jsonreststore.zip