2 Replies Latest reply on Jul 24, 2009 4:00 PM by Fer Gia

    PanelMenu javascript error

    Fer Gia Newbie

      Hi All,
      I have an random problem with <rich:panelMenu />
      Im using facelets and this is the tamplate.xhtml

      <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <!-- menu -->
       <td width="5%" id="tdMenu" valign="top" >
       <ui:insert name="menu">
       <ui:include src="/pages/menu.xhtml" />

      The menu.xhtml page is:

      <h:form id="formMenu" >
       <rich:panelMenu binding="#{menuBean.menu}"/>

      menuBean references to a session scope managed bean MenuBean that
      have a property menu and a method getMenu that returns the PanelMenu:

      public HtmlPanelMenu getMenu(){
       if (menu == null){
       menu = new HtmlPanelMenu();
       //Creation of menu and submenus
       return menu;

      The problem is that sometimes (random and not allways), the menu is not rendered in the page.
      And I get a javascript error:
      "PanelMenu not found"

      Looking the page html source code, i see that when the error occurs,
      the page dont have loaded the panelMenu.js. (when the menu is showed, the js is present)
      There is some way to load this javascript file allways??

      I dont know what more to do...
      Some help?