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

    <rich:dropDownMenu> throws TagException

    Vivek Madapura Newbie

      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