It's not a secret anymore!*
The moose likes Struts and the fly likes Displaying a menu using struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Displaying a menu using struts" Watch "Displaying a menu using struts" New topic
Author

Displaying a menu using struts

A knibbs
Ranch Hand

Joined: Aug 23, 2006
Posts: 158
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

Joined: Aug 23, 2006
Posts: 158
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

Joined: Apr 13, 2005
Posts: 442
hi A knibbs ,

can you post some sample code for your case ?
A knibbs
Ranch Hand

Joined: Aug 23, 2006
Posts: 158
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying a menu using struts