wood burning stoves 2.0*
The moose likes JSP and the fly likes Runtime Html Menu in Jsp Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Runtime Html Menu in Jsp Page" Watch "Runtime Html Menu in Jsp Page" New topic
Author

Runtime Html Menu in Jsp Page

Naveen Sydney
Ranch Hand

Joined: Jan 21, 2002
Posts: 30
If u have to build a menu(HTML +Javascript) at runtime in a jsp page.how would u do it?
1)When a user logs in based on his profile (which is read from ldap) his menu option changes.
Right now we display the menu as <a href> links on the home page and its ugly as hell. I would like to change it to a dropdown menu on the header. Any ideas's
2)To complicate the problem different menu items have related search options.(right now displayed as a dropdown and input box next to the link on the hompage).If i were to replace the menu with a drop down how would i display the search options?
I do have some ideas, was wondering if anyone has done this before.
Cheers
syd
ersin eser
Ranch Hand

Joined: Feb 22, 2001
Posts: 1072
Custom tags , using nested tags ( getParent,findAncestorWithClass) depending on parent( which you can tie it to user ) u can display menu.High Coupling is an issue ,use interfaces to limit coupling. Read Custom Tagl Libraries related book ( Manning Press has one )
Naveen Sydney
Ranch Hand

Joined: Jan 21, 2002
Posts: 30
i do use nested custom tags to display tabular data which is retrieved from database and held in session as java objects.
But here if i take the same approach
1) Heavy Server-side functionality,hence user has to wait for the web page to hit the server to make the menu dynamic.
2) The menu will look like a list of <td> in a table rather than a list of links i have.Will not be able to achieve a dhtml menu look.
regards
syd
 
Don't get me started about those stupid light bulbs.
 
subject: Runtime Html Menu in Jsp Page
 
Similar Threads
Populating DropDown in javascript
servlets and html pages
additional values in the dropdown
selectOneMenu disabled
content of dropdown B will depend on what is selected on dropdown A