7 Replies Latest reply on May 30, 2007 7:46 AM by Gintautas S.

    drop down menu in Rich Faces

    Gintautas S. Newbie


      I have some problems. In RichFaces live demo
      ( http://livedemo.exadel.com/richfaces-demo/richfaces/dropDownMenu.jsf?c=dropDownMenu )
      i saw DropDownMenu component which is absent in jboss-richfaces-3.0.0.zip!

      So i downloaded source files from SVN and built ajax4jsf-1.1.1-SNAPSHOT.jar. I found DropDownMenu, BUT, look what happens when i use RF Live Demo code fragment:
      [img] http://img217.imageshack.us/img217/1263/menuzz1.jpg [/img]

      Any ideas why this happens?

      I'm using richfaces-3.0.1-20070529.001425-68.jar SNAPSHOT and ajax4jsf-1.1.1-SNAPSHOT.jar.

        • 1. Re: drop down menu in Rich Faces
          Ilya Shaikovsky Master

          Please loot through wiki to find many usefull resources including links to the snapshots. So, download latest snapshots and try to use please.

          • 2. Re: drop down menu in Rich Faces
            Ilya Shaikovsky Master

            sorry, can't edit posts.. so, I mean "look through"

            • 3. Re: drop down menu in Rich Faces
              Gintautas S. Newbie

              I have latest Rich Faces nightly build and 221st revision of ajax4jsf (latest i think).

              • 4. Re: drop down menu in Rich Faces
                Ilya Shaikovsky Master

                Did you cleared caches after libraries update?

                • 5. Re: drop down menu in Rich Faces
                  Gintautas S. Newbie

                  Yes, but didn't help.

                  Maybe somebody could upload working ajax4jsf, richfaces and oscache libraries with DropDownMenus, so i could check if this was the problem?

                  • 7. Re: drop down menu in Rich Faces
                    Gintautas S. Newbie

                    Changed nothing.

                    Hm, here is what i do steb by step:

                    1. Using JDeveloper i create Web Application [JSF, ADF, BD].

                    2. Copy "ajax4jsf-1.1.1-20070530.003007-129.jar" and "oscache-2.3.2.jar" (also "commons-collections-3.2.jar" needed) to the WEB-INF\lib.

                    3. Add the following content into the WEB-INF/web.xml file:

                     <display-name>Ajax4jsf Filter</display-name>
                     <servlet-name>Faces Servlet</servlet-name>
                     <!-- Faces Servlet -->
                     <servlet-name>Faces Servlet</servlet-name>
                     <!-- Faces Servlet Mapping -->
                     <servlet-name>Faces Servlet</servlet-name>

                    4. Add <xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">.

                    5. Add "ajax4jsf-1.1.1-20070530.003007-129.jar" to the Libraries list, because JDeveloper cannot find org.ajax4jsf.Filter class.

                    Using Ajax4jsf Developer Guide example everything works!

                    Now richFaces:

                    6. Copy "richfaces-3.0.1-20070530.003007-70.jar" to WEB-INF\lib.

                    7. Add lines to WEB-INF\web.xml:


                    8. Add <xmlns:rich="http://richfaces.ajax4jsf.org/rich">.

                    9.Add "richfaces-3.0.1-20070530.003007-70.jar" to the Libraries list.

                    Here's source code of my page:

                    <?xml version='1.0' encoding='windows-1257'?>
                    <jsp:root xmlns="http://www.w3.org/1999/xhtml"
                     xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
                     <jsp:output omit-xml-declaration="false" doctype-root-element="html"
                     doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
                     <jsp:directive.page contentType="text/html;charset=windows-1257"/>
                     <meta http-equiv="Content-Type" content="text/html; charset=windows-1257"/>
                     <div class="sample-container">
                     <rich:dropDownMenu value="File">
                     <rich:menuItem submitMode="ajax" value="New"/>
                     <rich:menuItem submitMode="ajax" value="Open"/>
                     <rich:menuGroup value="Save As...">
                     <rich:menuItem submitMode="ajax" value="Text File"/>
                     <rich:menuItem submitMode="ajax" value="PDF File"
                     <rich:menuItem submitMode="ajax" value="Close"/>
                     <rich:menuSeparator id="menuSeparator11"/>
                     <rich:menuItem submitMode="ajax" value="Exit"/>

                    And the result:


                    I use Jdeveloper ( with embedded OC4J server (

                    I can't figure out, what's wrong.