0

I am using (jquery) dynatree with struts. The items on the tree will be created this way:

  1. 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.
  2. when save is clicked on the pop up, the record is created using ajax and the tree is refreshed.
  3. 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.
  4. This action can be performed on every node.
  5. Each node should be able to store the id of the parent.
  6. 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
Uchenna Nwanyanwu
  • 3,174
  • 3
  • 35
  • 59
  • I can't seem to help you because unless I'm missing something obvious, I don't think you are asking a question. What are you having trouble with? – Zack Apr 18 '12 at 12:37
  • The trouble is that i don't really know how to go about this issue. I need to produce a jsp that can achieve this. This is actually a task that i need to accomplish. – Uchenna Nwanyanwu Apr 18 '12 at 13:09
  • Please can someone answer this question. This is a show stopper in my application. Thanks – Uchenna Nwanyanwu Apr 23 '12 at 09:35

1 Answers1

3

I can't really help you because you did not post any code and stackoverflow is not the place to ask someone to write code for you.

What I would suggest doing is going to the Dynatree Example Page and looking at all the different tree examples they have posted there. Under each tree example there is source code for that particular example. Pick the example that best represents what you want to do in your project, and then try to modify it to what you exactly want. Then when / if you have problems, edit your post with code so we can help you.

Also you can check out these pieces of documentation that will help you.

Dynatree Documentation
jQuery Documentation

Zack
  • 5,108
  • 4
  • 27
  • 39
  • 1
    Try going to the example page I provided you and copy and paste one of the examples and fiddle around with it. When I started with dynatree, I was in your shoes. There is more than enough documentation on it. – Zack Apr 24 '12 at 11:47