Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying a menu using struts

 
A knibbs
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all I am trying to put together a menu type system that users can click on. They need to be able to click on one of the first level options and be presented with a second level to a third and fourth and so on. The manner in which I was planning on doing this was creating arraylists for each of the menu rows, and when one is clicked submitting the page with that value and adding the next row. Does this sound like a horrible manner in which to do this ? Is there a better manner ?

thanks in advance.
 
A knibbs
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After some reading/posting on some forums I have been convinced I may have more luck using a DefaultMutableTreeNode. Hopefully this may help someone in the future.
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi A knibbs ,

can you post some sample code for your case ?
 
A knibbs
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nakata kokuyo:
hi A knibbs ,

can you post some sample code for your case ?


I would but the requirements/available information may be changing in this aspect. I am pushing to have a seperate table in the db created instead of having this structure stored in memory, as there would be approximately 13,000 nodes involved in this.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic