Introduction to Struts-Menu

xiaoxiao2021-03-06  39

Current version 1.3, the download binary / source file is often used in web page development, we often need to use some of the menu (selection menu), may be a drop-down option, may be a label menu, may be a tree menu, Struts-Menu, Help us achieve some common menus, which can save the time we have developed, and the following is available.

SimpleMenuDisplayer DropDownMenuDisplayer CoolMenuDisplayer CoolMenuDisplayer4 ListMenuDisplayer TabbedMenuDisplayer let's install example struts-menu, you can find a struts-menu.war files unzipped directory, put him% TOMCAT_HOME% / webapps / under, then use Http: // localhost: 8080 / struts-menu / you can see. Section 02 Struts-Menu installation

Put /LIB/Struts-Menu.jar in Web-INF / LIB / below /Lib/Struts-Menu.TLD to WEB-INF / LIB / to modify Web.xml Add to Taglib's call

/web-inf/struts-meu.tld

/web-inf/struts-meru.tld

Your JSP program needs to be added. <% @ Taglib URI = "/ Web-inf / struts-menu.tld" prefix = "menu"%>

Modify your web-inf / struts-config.xml, add Plugin

Establish /Web-inf/Menu-Config.xml as a Menu configuration file, the following is the example file

ENCODING = "UTF-8"?>

TYPE = "com.fgm.meb.Menu.displayer.dropdownmenudisplayer" />

TYPE = "com.fgm.meb.Menu.displayer.simplemenudisplayer" />

TYPE = "com.fgm.meb.Menu.displayer.coolmenudisplayer" />

TYPE = "com.fgm.meb.Menu.displayer.coolmenudisplayer4" />

Type = "com.fgm.meb.Menu.example.PermissionsformMenudisplayer" />

TYPE = "com.fgm.web.menu.displayer.listmenudisplayer" />

TYPE = "com.fgm.meb.Menu.displayer.tabbedmenudisplayer" />

Tooltip = "shows usage of the menu displayers use defaults."

Page = "/ menutest1.jsp" />

Tooltip = "Shows Customized Menu Displays."

Page = "/ menutest2.jsp" />

Tooltip = "Shows Menu Using CoolMenu3"

Page = "/ coolmenu1.jsp" />

Tooltip = "Shows Menu Using CoolMenu3 with forms."

Page = "/ coolmenu2.jsp" />

Tooltip = "EXAMPLE Use of Menu Disable and permission checking with coolmenus."

Page = "/ permissionsform.jsp" />

Tooltip = "Shows Menu Using CoolMenu4"

Page = "/ coolmenu4.jsp" />

Tooltip = "Shows Expandable DHTML LIST"

Page = "/ dhtmlexpandable.jsp" />

Page = "/ dhtmldropdown.jsp" />

Tooltip = "Shows Menus Based On User's Role"

Page = "/ rolesmenu.jsp" />

Tooltip = "Shows Tabbed-Based Menu"

Forward = "tabbedmenu" />

Section 03 Basic Menu - SimpleMenudisplayer TagLib Usage We can use Menu: UseMenudisplayer Name = "Simple" to call SimpleMenudisplayer, then specify menu: displaymenu to specify IndexMenu, will display menu-config.xml configuration menu component display Come out. If it is a multi-layer situation, it will also be rendered in the trend. <% @ Page contentType = "text / html; charSet = UTF-8"%>

<% @ Taglib URI = "/ Web-INF / STRUTS-MENU.TLD" prefix = "menu"%>

Section 04 Drop-Plit Order - DropDownMenudisplayer Taglib Usage Method Dramation Menu, which can be expanded and closed, the method of use with SimpleMenudisplayer, only need to be changed to Menu: usemenudisplayer name = "Dropdown" is OK. Section 05 Floating menu - the use of floating CoolMenuDisplayer taglib addition to the change-down menu:. useMenuDisplayer name = "CoolMenu" or "CoolMenu4" may also be a need to obtain CoolMenu javascript coolmenu3.js, CoolMenu4 is the need to obtain and javascript coolmenu4.js cm_addins.js, And to configure the associated coolMenu-config.js, you can configure the graphics and colors of his display. Section 06 Tree Menu - Listmenudisplayer Taglib Usage Tree Menu is set to "ListMenu" to "listmenu". You can add mexpandable.js, call expandMenus () to display all child nodes. Section 07 Tag menu - TabbedMenudisplayer Taglib Usage Method Tag menu will be set to "TabbedMenu", and join tabs.js, section 08 Conclusion Struts-menu can also be combined with Permission, Role, allowing users with this permission to see and use those options, interested in refer to the example, I think the Taglib component of Mr. Sun Sancai, Taiwan's JSPWidget is more Attractive, if you can combine these two, you can make normally browse, then the dream developed by Web Ui-Component will come ... Reference - related books or related articles

Strutshttp: //jakarta.apache.org/struts/ struts-menuhttp: //sourceforge.net/pr Ojects / Struts-menu /

转载请注明原文地址:https://www.9cbs.com/read-68530.html

New Post(0)