<quote>
/* You can call initializeMenus() manually from your JSP if this doesn't work.</quote>
* Just put the following code after the last menu tag.
* <script type="text/_javascript_">
* initializeMenus();
* </script>
*/
window.>
Hope this helps,
Matt
I'm trying to integrate the ListMenu into my app. I'm using the this example http://demo.raibledesigns.com/struts-menu/dhtmlExpandable.jsp
The menu is populated, but it won't expand when I click the plus sign.
Menu-config.xml:
<MenuConfig>
<Displayers>
<Displayer name="CoolMenu" type="net.sf.navigator.displayer.CoolMenuDisplayer4"/>
<Displayer name="ListMenu" type="net.sf.navigator.displayer.ListMenuDisplayer"/>
</Displayers>
. . . . Cool Menus not included for brevity
</MenuConfig>My JSP:
<%@ include file="/common/taglibs.jsp"%>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="" value='/styles/menuExpandable.css'/>" />
<script type="text/_javascript_" src="" value='/scripts/menuExpandable.js'/>"></script>
</head>
<menu:useMenuDisplayer name="ListMenu" repository="tree">
<c:forEach var="menu" items="${tree.topMenus}">
<menu:displayMenu name="${menu.name}"/>
</c:forEach>
</menu:useMenuDisplayer>
The Resulting source:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<!-- HTTP 1.1 -->
<meta http-equiv="Cache-Control" content="no-store"/>
<!-- HTTP 1.0 -->
<meta http-equiv="Pragma" content="no-cache"/>
<!-- Prevents caching at the Proxy Server -->
<meta http-equiv="Expires" content="0"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="author" content="Matt Raible ([EMAIL PROTECTED])"/>
<link rel="icon" href=""> <title> | Skills Inventory</title>
<link rel="stylesheet" type="text/css" media="all" href="" />
<link rel="stylesheet" type="text/css" media="all" href="" />
<link rel="stylesheet" type="text/css" media="print" href="" />
<script type="text/_javascript_" src=""> <script type="text/_javascript_" src="">
<script type="text/_javascript_" src=""> <script type="text/_javascript_" src=""> <link rel="stylesheet" type="text/css" media="all" href="" />
<script type="text/_javascript_" src=""> <script type="text/_javascript_" src="">
<link rel="stylesheet" type="text/css" media="screen" href="" />
<script type="text/_javascript_" src=""> </head>
<body>
<script type="text/_javascript_" src=""> <div id="topMenu">
<script type="text/_javascript_">
<!--
oCMenu.makeMenu('MainMenu','','Main Menu','/MentorApp/mainMenu.html','','90','','','','','','','',0,'','','','');
oCMenu.construct();
//-->
</script>
</div>
<div id="content">
<h1></h1>
<div id="menuDiv">
<ul id="menuList">
<li class="menubar">
<a href="" id="Diagonostics/TherapeuticsActuator" class="actuator"> </a><a href="" title="Diagonostics / Therapeutics" class="base">Diagonostics / Therapeutics</a>
<ul id="Diagonostics/TherapeuticsMenu" class="menu">
<li><a href="" title="Abdominal Radiographs and Interpretation">Abdominal Radiographs and Interpretation</a></li>
<li><a href="" title="Abdominocentesis">Abdominocentesis</a></li>
<li><a href="" title="Arteriole Catheterization">Arteriole Catheterization</a></li>
</ul>
</li>
</ul>
</div>
</div>
</body>
</html>
Action code:
MenuComponent mc, mc2;
MenuRepository repository = new MenuRepository();
MenuRepository defaultRepository = (MenuRepository) getServlet().getServletContext()
.getAttribute(MenuRepository.MENU_REPOSITORY_KEY);
repository.setDisplayers(defaultRepository.getDisplayers());
// for each root
for (CompetencyGroup root : roots) {
mc = new MenuComponent();
mc.setName(root.getName());
mc.setTitle(root.getName());
mc.setLocation(request.getContextPath() + "/editGroup.html?index=0");
repository.addMenu(mc);
// for each child
for (Competency competency : root.getCompetencies()) {
mc2 = new MenuComponent();
mc2.setName(competency.getDescription());
mc.setTitle(competency.getDescription());
mc2.setLocation(request.getContextPath() + "/editRating.html?index=0");
mc2.setParent(mc);
}
}
// put the repository in request
request.setAttribute("tree", repository);
}
}
I tried dropping the static example list http://demo.raibledesigns.com/struts-menu/dhtmlExpandable.jsp into my JSP and adding the menus to menu-config.xml, butI have the same problem.
As you can see, the menu displays and is populated with children, but it won't expand.
Any help would be greatly appreciated.Thanks,
Chris Sturm
Sr. Software Engineer
Enterprise Application Services
Banfield, The Pet Hospital
(503) 922 5611
www.banfield.net