MenuBar action not working.

UI Components for JSF
Post Reply
akh
Posts: 8
Joined: 06 May 2010, 17:37

24 May 2010, 16:02

Hi Guys,
I am trying to use Menubar but the action method doesn't get called. Am i missing something?

Code: Select all

<h:form >
<p:menubar id="menubaralarm">
	<p:submenu id="submenualarm">
		 <f:facet name="label">
			<p:menuitem id="menuitemalarm" value="Recent Activity" action="#{horizontalmenu.actionRecentActivityPage}"/>
		</f:facet>
	</p:submenu>
</p:menubar>
</h:form>

Regards,
Adnan

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

24 May 2010, 16:11

This should work as showcase seems to be working just fine.

http://www.primefaces.org:8080/prime-sh ... enubar.jsf

What happens when you click on menuitem, is an ajax request fired?

Are you sure your method is not called? Can you set ajax="false" on menuitem to see if page is posted?

akh
Posts: 8
Joined: 06 May 2010, 17:37

24 May 2010, 17:10

Thanks for your reply,

Yes, i have got it working, had to set ajax=false to get the functionality i want.

Regards,
Adnan

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

24 May 2010, 17:21

Still it should work when ajax="true" as shown in showcase, are you sure you don't want to update anything on page after menuitem action?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 64 guests