3 Replies Latest reply on Nov 4, 2010 8:29 AM by ilya_shaikovsky

    <rich:dropDownMenu> throws TagException

    vivek_madapura

      Hi

       

      I am using JSF 2.0 with RichFaces 3.3.3. I have a xhtml file which builds a menubar with dropdown menu.

       

      The tag <rich:dropDownMenu> throws javax.faces.view.facelets.TagException.

       

       

      Contents of file menubar.xhtml

       

      <!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: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">

       

      <body>

       

      <ui:composition>
          <h:form>
              <rich:toolBar>
                  <rich:dropDownMenu>
                      <f:facet name="label">
                          <h:outputText value=" Edit" />
                      </f:facet>
                      <rich:menuItem submitMode="ajax" value="Undo" />
                  </rich:dropDownMenu>
                  <rich:dropdownMenu>
                      <f:facet name="label">
                          <h:outputText value=" Help" />
                      </f:facet>
                      <rich:menuItem submitMode="ajax" value="About" />
                  </rich:dropdownMenu>
              </rich:toolBar>
          </h:form>
          <!-- <rich:spacer width="1" height="5" />
          <rich:spacer width="1" height="25" /> -->
      </ui:composition>
      </body>
      </html>

       

      On trying to run this page on Tomcat server 6 the javax.faces.view.facelets.TagException is thrown, you may find an excerpt of the stack trace below

       

      javax.faces.view.facelets.TagException: /templates/menubar.xhtml @16,23 <rich:dropDownMenu> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: dropDownMenu
          at com.sun.faces.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:289)
          at com.sun.faces.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:228)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:767)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
          at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
          at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)

      ...

       

      Hope I have posted this problem in the right forum. Any advice is much appreciated

        • 1. Re: <rich:dropDownMenu> throws TagException
          ilya_shaikovsky

          show please libraries listing from war libs folder.

          It should not depends on JSF version used.. ui is just the same and only impl's changes. So if works at livedemo - should work for JSF 2 build. I will check anyway but sure that it's not the cause.

          • 2. Re: <rich:dropDownMenu> throws TagException
            vivek_madapura

            Hi Ilya,

             

            Thanks for your time. Here is the list of jars in my WEB-INF/libs

             

            • commons-beanutils.jar
            • commons-beanutils-core.jar
            • commons-collections-3.2.1.jar
            • commons-digester-1.8.jar
            • commons-logging-1.1.1.jar
            • jsf-api.jar
            • jsf-facelets.jar
            • jsf-impl.jar
            • jstl-1.2.jar
            • richfaces-api-3.3.3.Final.jar
            • richfaces-impl-jsf2-3.3.3.Final.jar
            • richfaces-ui-3.3.3.Final.jar
            • 3. Re: <rich:dropDownMenu> throws TagException
              ilya_shaikovsky

              I'm seeing only one missprint at your code

              second <rich:dropdownMenu> should be <rich:dropDownMenu>

               

              And just getting richfaces-demo-jsf2-3.3.3 run and seing demo rendered well.

               

              maybe try to replace your code with demo code using cut/paste for check Just to be sure there are no more missprints Iwe missing