Programmatically expand MenuItems on pageLoad

UI Components for JSF
Post Reply
cingram007
Posts: 3
Joined: 11 Jan 2017, 22:24
Location: Toronto, Canada

23 May 2017, 17:24

HI,
I have some MenuItems created using a menuModel under a p:menu. Currently the
list expands when the overlayed p:commandButton is clicked(). I would like the
menu to be expanded when the page has finished loading. Is this possible? If so how?
Perhaps there a way to use Jquery to pass an click event to expand the Menu
after the page has loaded.

Chris
PF 5.0,
Mojarra 2.1.20-04; Mojarra is the JSF Reference Implementation
NetBeans 8
PF 5.0
Mojarra 2.1.4
Tomcat 7.0.14
NetBeans 8.0.2
Eclipse Indigo

cingram007
Posts: 3
Joined: 11 Jan 2017, 22:24
Location: Toronto, Canada

24 May 2017, 19:30

I found an answer. Using p:remoteCommand I passed a p:commandButtons click event after the page finished loading, which opened the menu list. This circumvented the need to call the menu's expand command.

regards,
Chris
PF 5.0
Mojarra 2.1.4
Tomcat 7.0.14
NetBeans 8.0.2
Eclipse Indigo

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 55 guests