I am using (jquery) dynatree with struts. The items on the tree will be created this way:
- On right click of a node, a context menu shows with options like [create, modify and delete]. On click of "Create", a pop up shows which contains input fields for data capture.
- when save is clicked on the pop up, the record is created using ajax and the tree is refreshed.
- On creation of the record, the record should send to the server the id of the parent node which is usually the primary key of the parent node's data stored on the server or database.
- This action can be performed on every node.
- Each node should be able to store the id of the parent.
- Each node or child node should also know it's level on the tree. i.e. Child node one has a level of 1. Thanks