Guilherme,
I try the dynamic menu and get the following error:
javax.servlet.ServletException: org.apache.jasper.JasperException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF
ilter.java:122)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:186)
I first try with version 1.0.9 and get only the first menu (not the
children). As I know it is a bug in the 1.0.9, I downloaded the lastest
nightly build
(from 22/08) And put myfaces-api.jar, myfaces-impl.jar and tomahaw.jar
instead of myfaces.jar.
Could someone really help me (see my code) because I don't know where the
problem resides and need really to make this stuff running.
Could you, please send me your example and tell me the release you use.
Thanks very much
Henri-Philippe
My code is the following:
1) jsp page to include:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="t"%>
<h:panelGrid id="header_group1" columns="2" styleClass="pageHeader1" >
<h:graphicImage id="header_logo" url="images/sigl2.gif" alt="yo man" />
<f:verbatim>
<font size="+1" color="#FFFFFF">MyFaces - The free JavaServer™
Faces Implementation</font>
<font size="-1" color="#FFFFFF">(Version 1.0.9 beta)</font>
</f:verbatim>
</h:panelGrid>
<h:panelGrid id="header_group2" columns="1" styleClass="pageHeader2"
columnClasses="pageHeader2col1" >
<t:jscookMenu layout="hbr" theme="ThemePanel" >
<%/* Availaible jscookMenu themes: ThemeIE, ThemeMiniBlack,
ThemeOffice, ThemePanel
Availaible jscookMenu layout: hbr, hbl, hur, hul, vbr, vbl,
vur, vul
respect to Heng Yuan http://www.cs.ucla.edu/~heng/JSCookMenu
*/%>
<t:navigationMenuItems value="#{MainDynamicMenu.navItems}" />
</t:jscookMenu>
</h:panelGrid>
2) main jsp page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page session="false" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<html>
<head>
<title>Welcome to SIGL2</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="images/favicon.ico" >
<!--stylesheet for older browsers-->
<link rel="stylesheet" href="styles/sigl_n4.css" type="text/css">
<!--stylesheet for modern browsers-->
<style type="text/css">
@import "styles/sigl.css";
</style>
<script language="javascript">
function rolloversp(imgid,imgsrc,mainsrc)
{
eval("document.images['"+imgid+"'].src='"+imgsrc+"'")
document.images['mainimg'].src = mainsrc
}
</script>
</HEAD>
<BODY bgcolor="#0A51A1" alink="#FFFFFF" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0">
<f:view>
hello world
<h:outputText>
output text
</h:outputText>
<h:panelGroup id="sfooter">
<f:verbatim>
Copyright (c) 2003-2005 <a
href="http://myfaces.apache.org" class="pageFooter">The MyFaces Team</a>
</f:verbatim></h:panelGroup>
<f:facet name="header">
<f:subview id="header">
<jsp:include page="page_header.jsp" />
</f:subview>
</f:facet>
<[EMAIL PROTECTED] file="page_footer.jsp" %>
</f:view>
</BODY>
</HTML>
3) My backing bean:
public class MainDynamicMenu {
private NavigationMenuItem[] navItems;
public MainDynamicMenu(){
NavigationMenuItem[] subItems1 = new NavigationMenuItem[3];
// children for item 1
subItems1[0] = new
NavigationMenuItem(Message.getMessage("KEY_MENU11_CHANGE_CONTEXT"),"action",
null,false);
subItems1[1] = new
NavigationMenuItem(Message.getMessage("KEY_MENU12_CHANGE_USER_PROFILE"),"act
ion",null,false);
subItems2[2] = new
NavigationMenuItem(Message.getMessage("KEY_MENU13_LOGOUT"),"action",null,fal
se);
// item 1
NavigationMenuItem item1WithChildren = new
NavigationMenuItem(Message.getMessage("KEY_MENU1_FILE"),"action",null,false)
;
item1WithChildren.setNavigationMenuItems(subItems1);
// root item
navItems = new NavigationMenuItem[1];
navItems[0] = item1WithChildren;
}
public NavigationMenuItem[] getNavItems(){
return navItems;
}
public void setNavItems(NavigationMenuItem[] navItems){
this.navItems = navItems;
}
}
4) managed bean:
<managed-bean>
<description>Main Menu</description>
<managed-bean-name>MainDynamicMenu</managed-bean-name>
<managed-bean-class>eu.cec.trade.sigl2.web.MainDynamicMenu</managed-bean-cla
ss>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
-----Original Message-----
From: Guilherme Gomes [mailto:[EMAIL PROTECTED]
Sent: lundi 22 août 2005 14:09
To: MyFaces Discussion
Subject: RE: help moving from public 1.0.9 to nightly build
Well, i was wrong, he split parameter also works for
NavigationMenuItems other than the top level ones.
I only saw it after restarting JBOSS.
So you can have a sun-menu with a list of items and
have a separator between them
Guilherme Gomes
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com