You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jeremy Sager <js...@chessys.com> on 2006/01/19 00:13:50 UTC

JSCookMenu throws a null pointer exception for value

Hi guys -

I'm using MyFaces with Facelets. I've gotten the component and renderer set
up in the taglib, and it appears to be working fine, except that I get a
null pointer exception when it tries to new up a SelectItem.

<t:navigationMenuItem id="fileMenu" itemLabel="File">

Here's the relevant part of the stack trace:
at javax.faces.model.SelectItem.<init>(SelectItem.java:69)
	at
org.apache.myfaces.custom.navmenu.NavigationMenuItem.<init>(NavigationMenuIt
em.java:50)
	at
org.apache.myfaces.custom.navmenu.NavigationMenuItem.<init>(NavigationMenuIt
em.java:65)
	at
org.apache.myfaces.custom.navmenu.NavigationMenuUtils.getNavigationMenuItemL
ist(NavigationMenuUtils.java:63)
	at
org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.encodeCh
ildren(HtmlJSCookMenuRenderer.java:120)
	at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:31
9)
	at
com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:
546)
	at
com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:
551)
	at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457)
	at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
	


Do I need to add a value binding for a NavigationMenuItem in order for it to
work? That's what the facelets debugger seems to think, but if I make some
sort of method that returns a NavigationMenuItem I'm really back on street 1
because I have to pass in a value binding to the NavigationMenuItem I'd
create manually or I'd wind up with the same result...

Is this a bug or am I missing the obvious? The latter most likely :)

Jeremy Sager
Data Communications Product Manager
Chesapeake System Solutions
410.356.6805 x120
JSager@chessys.com