3 Replies Latest reply on May 7, 2008 6:44 PM by Mario Baracu

    Using Menu for navigation (with a damn bug)

    Mario Baracu Newbie

      I have a working solution in IE but it has a bug with Firefox and Opera :(

      when i click on a group this error appears in my Apache Tomcat 6.0.16. The page continue Ok with IE but crash when i use Firefox or Opera

      (...) An exception occurred
      java.lang.IllegalArgumentException: FacesEvent of class javax.faces.event.ActionEvent not supported by UIInput (...)


      The code for the menu using selectedChild and expand.
      <a4j:outputPanel id="outputPanelMenu" >
       <rich:panel styleClass="panel_menu" id="panelMenu" rendered="${Login.loggedIn}" >
      
       <rich:panelMenu
       selectedChild="${componentNavigator.currentItem}"
       width="100%"
       height="300px"
       mode="ajax"
       expandSingle="true"
       expandMode="ajax"
       iconExpandedGroup="disc" iconCollapsedGroup="disc"
       iconExpandedTopGroup="triangleUp" iconGroupTopPosition="right"
       iconCollapsedTopGroup="triangleDown" iconCollapsedTopPosition="right" >
      
       <rich:panelMenuGroup id="groupUserManagement" expandMode="ajax" label="User Management" expanded="${componentNavigator.currentUserManagement}">
       <ui:include src="/templates/include/components-group.xhtml">
       <ui:param name="components" value="#{componentNavigator.userManagement}" />
       </ui:include>
       </rich:panelMenuGroup>
      
       </rich:panelMenu>
       </rich:panel>
       </a4j:outputPanel>


      this is the components-group.xhtml

      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:c="http://java.sun.com/jstl/core">
      <ui:composition>
       <c:forEach items="#{components}" var="component">
       <rich:panelMenuItem icon="#{component.iconImage}" name="#{component.id}" action="${componentNavigator.currentComponentByMenu}" reRender="formBody">
       <span style="display:block;padding-top:0px;text-decoration : none; color : #000000;">
       #{component.name}
       </span>
       <f:param value="#{component.id}" name="currentComponentByMenu"/>
       </rich:panelMenuItem>
       </c:forEach>
      </ui:composition>
      </html>



      Richfaces 3.2.0 SR1
      NetBeans IDE 6.1 (Apache Tomcat 6.0.16)
      JSTL 1.2
      JSF 1.2 (myfaces-core-1.2.2)
      Facelets-1.1.14