Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in jsp..  RSS feed

 
Chandra Bairi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends,
I have a problem which i am supposed to solve in jsp. It is like this.
I have a tree on a html page and also two buttons along with that. When the I click the add button a random node should get added to the tree and when I click the delete button one node should be deleted from that. Is this possible in jsp and if it is I request you to just give me hints about the answer. i will try to proceed from thereon.
Thanks for any help.
shekar.
 
Winston Smith
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is certainly possible. How are you modeling your tree? If you are using a JavaBean (with a Tree data structure), you can randomly add and remove nodes when the user clicks a button by:
  • redirecting user request to intermediate JSP page, where the actual processing will take place
  • on this intermediate page, add/remove a node as required
  • request is redirected back to original page, where updated Tree will be displayed
  • NOTE: The actual visual representation of the graph may be a bit tricky, but this is definitely possible.
    [ March 01, 2004: Message edited by: Winston Smith ]
     
    Chandra Bairi
    Ranch Hand
    Posts: 152
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    hello friend,
    can you give me some code as to how to begin. It is not clear as to how and where I should start. The skeleton with some comments.
    regards
    shekar.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!