1 Reply Latest reply on Apr 29, 2012 7:12 PM by Nielson Júnior

    Problem with rich:toolBar

    Nielson Júnior Newbie

      Hello, guys, I need your help. I upgraded my project for JSF 2.0 and RichFaces 4.2.1, but now I have some problems, one of them is the toolbar is not working. It seems the RichFaces tags cannot be found, and I don't know why. I spent all the day trying correct this with no success.  I think that could be a problem with my classpath, but I do not find the error. I am developing with Eclipse IDE Galileo.

       

      The exception showed on the console is:

       

      javax.faces.view.facelets.TagException: /pages/layout/menu.xhtml @13,17 <rich:toolBar> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: toolBar

       

      My web.xml is:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="WebApp_ID" version="2.5"
       xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
       <display-name>ManterEquipe</display-name>
       <welcome-file-list>
                 <welcome-file>index.xhtml</welcome-file>
                 <welcome-file>index.jsp</welcome-file>
       </welcome-file-list>
       <context-param>
             <param-name>org.ajax4jsf.SKIN</param-name>
             <param-value>classic</param-value>
       </context-param>
      
       <servlet>
             <servlet-name>Faces Servlet</servlet-name>
             <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
             <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
             <servlet-name>Faces Servlet</servlet-name>
             <url-pattern>*.xhtml</url-pattern>
             <url-pattern>*.jsf</url-pattern>
             <url-pattern>*.faces</url-pattern>
       </servlet-mapping>
      
      
          <servlet>
                    <servlet-name>Resource Servlet</servlet-name> 
                    <servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class> 
                    <load-on-startup>1</load-on-startup> 
          </servlet>
          <servlet-mapping>
                    <servlet-name>Resource Servlet</servlet-name>
                    <url-pattern>/org.richfaces.resources/*</url-pattern>
          </servlet-mapping>
       <jsp-config>
        <taglib>
         <taglib-uri>http://myfaces.apache.org/tomahawk</taglib-uri>
         <taglib-location>/META-INF/tomahawk.tld</taglib-location>
        </taglib>
       </jsp-config>
       <login-config>
        <auth-method>BASIC</auth-method>
       </login-config>
      </web-app>
      
      

       

      The jars in my classpath are:

       

      • antlr-2.7.7.jar
      • aopalliance-1.0.jar
      • commons-beanutils-1.8.0.jar
      • commons-collections-3.1.jar
      • commons-digester-2.0.jar
      • commons-io-2.0.1.jar
      • commons-lang-2.5.jar
      • commons-logging-api-1.1.jar
      • cssparser-0.9.5.jar
      • dom4j-1.6.1.jar
      • guava-10.0.jar
      • hibernate-commons-annotations-4.0.1.Final.jar
      • hibernate-core-4.1.1.Final.jar
      • hibernate-entitymanager-4.1.1.Final.jar
      • hibernate-jpa-2.0-api-1.0.1.Final.jar
      • javassist-3.15.0-GA.jar
      • jboss-logging-3.1.0.GA.jar
      • jboss-transaction-api_1.1_spec-1.0.0.Final.jar
      • jsf-api-2.0.3-b05.jar
      • jsf-impl-2.0.3-b05.jar
      • jstl-2.4.jar
      • mysql-connector-java-5.1.10-bin.jar
      • primefaces-2.2.1 (1).jar
      • richfaces-components-api-4.2.1.Final.jar
      • richfaces-components-ui-4.2.1.Final.jar
      • richfaces-core-api-4.2.1.Final.jar
      • richfaces-core-impl-4.2.1.Final.jar
      • sac-1.3.jar
      • slf4j-api-1.5.8.jar
      • slf4j-log4j12.jar
      • tomahawk12-1.1.9.jar
      • xmlbeans-2.3.0.jar

       

      And the page that uses the toolBar is:

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:a4j="http://richfaces.org/a4j"
            xmlns:rich="http://richfaces.org/rich"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:t="http://myfaces.apache.org/tomahawk"
            >
                <body> 
                <h:form id="formMenu"> 
                          <rich:toolBar>
                                    <rich:menuItem id="menuEquipe" value="Equipe" action="#{equipeBean.consultaEquipe}" /> 
                                    <rich:menuItem id="menuTipo" submitMode="ajax" value="Tipo de Equipe" action="#{tipoEquipeBean.cadastrarTipo}" ></rich:menuItem> 
                                    <rich:menuItem id="menuServidor" submitMode="ajax" value="Servidor" action="#{servidorBean.cadastraServidor}" /> 
                   </rich:toolBar>             
                  </h:form>
                  
                </body>
      </html>