java - JSP menu design advice -
I'm looking for a horizontal menu in a jsp page - menu items vary according to user but on every page Stay tuned, except for the presence of active tabs, there is a simple enough problem in the site (the format has been modified using CSS) for that user, but I can not decide where to build a menu is .
Menu Code:
& lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "url1" & gt; Item 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li id = "active" & gt; & Lt; A href = "url2" & gt; Item 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; `
As I have seen that there are 3 options to get the menu item:
- The first time any administrator receives an HTTP request To store two arrays in the session - [url1, url2] and [item 1, item 2]. Then make all JSP pages in the next code. To enter the active ID, the URL must be known to make JSP against the [url1, url2] array.
- Create the above HTML separately in each controller as the controller knows that it is a URL of itself, it is easy to add an active ID.
- Make up html of any active ID, submit html in session, and then modify JP page / controller in HTML string.
None of these seem particularly delicious.
Do anyone have any advice on this?
Comments
Post a Comment