p:menuButton console error this.getMenu() is null

UI Components for JSF
Post Reply
kurt
Posts: 5
Joined: 19 Aug 2010, 21:58

19 Aug 2010, 22:45

I have the following ajax tag in an h:selectBooleanCheckbox:

<f:ajax execute="@this" render=":actions_more_header" listener="#{selectController.actionSelect}"/>

This works fine when I place other tag IDs in for the render attribute, but for p:menuButton I get this console error:
Error: this.getMenu() is null
Source File: https://localhost:8181/oms/primefaces_r ... /button.js
Line: 1 - this.getMenu().subscribe("click",this.handleClick,this,true)};

I simplified the menu button down to this and still get the error.
<h:form id="actions_more_header">
<p:menuButton value="Menu Header">
<p:menuitem value="Menu Item"/>
</p:menuButton>
</h:form>

Any ideas what's going on?

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

20 Aug 2010, 13:37

Try p:ajax.

kurt
Posts: 5
Joined: 19 Aug 2010, 21:58

24 Aug 2010, 17:45

The listener I have passes an AjaxBehavior event. It seems as though p:ajax has a different behavior for the listener attribute. Is there a way to get it to work without changing the method signature?

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

24 Aug 2010, 23:44

2.2.M1's p:ajax supports passing an AjaxBehaviorEvent as well as no-argument method. 2.1 doesn't have this.

kurt
Posts: 5
Joined: 19 Aug 2010, 21:58

25 Aug 2010, 21:13

Sounds good. I can live without using this until 2.2

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

25 Aug 2010, 23:58

Cool, 2.2.M1 should be out soon hopefully.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 41 guests