Background permission management menu design, background permission management menu
I. Functional requirements:
1. the main interface consists of three parts: header, menu, and main
For example
2. the menu bar and header are extracted jsp pages, which can be reused.
Click different menu options. The main page displays different modules. Click to exit the system.
3. How can different roles access the system and view different menus?
Ii. solution:
1. the main interface is usually used in combination with frame.
<frameset rows="50,*"> <frame src="header.htm" > <frameset cols="200,*"> <frame src="menu.htm" > <frame src="index.htm" name="view_frame" > </frameset></frameset>
2. The buttons in the menu should be marked with the target
<Div class = "list-group"> <a href = "#" class = "list-group-item active"> undergraduate management </a> <a href = "index.htm "target =" view_frame "class =" list-group-item "> course management </a> <a href =" addSite.htm "target =" view_frame "class =" list-group "-item "> Add course </a> <a href =" manageLessonBuild.htm "target =" view_frame "class =" list-group-item "> Course Construction Management </a> </div>
3. How does the exit button in the header exit the frame?
<A href = "#" onclick = "logout () "> <I class =" fa-sign-out fa-fw "> </I> exit </a> <script> function logout () {parent. window. location = "logout.htm" ;}</script>
Note: The header in spring mvc is a reserved word. If you use the head name directly, an error is returned. We recommend that you change it to the header.
4. Use the JSTL label to detect and hide buttons
The if tag in JSTL can be determined, but it cannot be used here, because the if tag in JSTL does not have else. If a role is used, the corresponding menu items are displayed. Otherwise, the corresponding menu items are not displayed.
Labels are recommended.
As follows:
<C: choose> <c: when test = "$ {1 = 0}"> // hide the button <p hidden = "hidden"> <a href = "lessonBuildUpdate.htm" target = "view_frame" class = "list-group-item"> Update course construction Information </a> </p> </c: when> <c: otherwise> // otherwise this button is displayed normally <a href = "lessonBuildUpdate.htm" target = "view_frame" class = "list-group-item"> Course Construction Information Update </a> </c: otherwise> </c: choose>