0

I'm moving legacy system to Java-stack. UI of this system have large count of pages with tree hierarchy. For navigation I've used p:menubar. When user logging on menubar is filling. Request all from DB takes much time so I want have lazy initialization for menubar subitems (and for subitems of it's subitems). Is it possible?

Gregory
  • 413
  • 5
  • 16
  • Have you read about **Dynamic Menus** in the Primefaces's documentation? You can create the menu programatically, so you can load step by step all you want. For example, when you click in a menu element, with ajax (and `update`), your app can load the submenu. This is the documentation for [latest version](http://www.primefaces.org/docs/guide/primefaces_user_guide_5_2.pdf) – Miguel Jun 23 '15 at 12:22
  • [Here](http://www.primefaces.org/showcase/ui/menu/menu.xhtml) is the online documentation with an example. The example uses a simple menu but you can use for a menubar too. – Miguel Jun 23 '15 at 12:36
  • @Miguel so you suggest write code wich changes menuItem to submenu and load data for it when user click on menuitem? Wanted out-of-the-box solution, not this bicycle :-( – Gregory Jun 24 '15 at 07:49
  • sorry but `p:menubar` doesn't have any attribute for lazy load of menu items and I don't know other easier solution. If you need lazy load you have to develop by yourself. Maybe other person can help you better than me. – Miguel Jun 24 '15 at 10:38

0 Answers0