<p:menu> problem on position="dynamic"

UI Components for JSF
Post Reply
JawwadM
Posts: 9
Joined: 15 Jun 2011, 12:00

23 Jun 2011, 08:53

Hi,

I am trying to show a menu when I click an image (onclick event). But the problem is when I set the attribute "position" to "dynamic", my page fails to render and gives the following null pointer exception:

java.lang.NullPointerException
at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:561)
at org.primefaces.component.menu.MenuRenderer.encodeScript(MenuRenderer.java:59)
at org.primefaces.component.menu.BaseMenuRenderer.encodeEnd(BaseMenuRenderer.java:38)

My menu code is:

Code: Select all

	<p:menu position="dynamic" widgetVar="myMenu">
		<p:menuitem><h:commandLink value="Download document" url="#"/></p:menuitem>
		<p:menuitem><h:commandLink value="Upload document" url="#"/></p:menuitem>
		<p:menuitem><h:commandLink value="Update document" url="#"/></p:menuitem>		
	</p:menu>
  
I am using Primefaces 3.0 M1. Can anyone tell me whats the problem and what im doing wrong in the code ????

Any help will be highly appreciated. Thanks in advance

Post Reply

Return to “PrimeFaces”

  • Information