4 Replies Latest reply on Feb 1, 2008 6:10 AM by Stefan Siebel

    dropdownmenu with richfaces 3.1.4 does not expand

    Stefan Siebel Newbie

      Hey folks,

      i'm currently trying to get the dropdown menu to work.

      my facelets page looks like this:

      <!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:rich="http://richfaces.org/rich"
       xmlns:a4j="http://richfaces.org/a4j">
      <head>
      <link rel="stylesheet" type="text/css"
       href="res/css/xperidesk_style.css" />
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>XperiDesk 1.0</title>
      </head>
      <body>
      <ui:include src="header.xhtml" />
      <h:form>
       <rich:toolBar>
       <rich:dropDownMenu value="File" event="onclick">
       <rich:menuItem submitMode="ajax" value="Save" action="#{loginHandler.something}"></rich:menuItem>
       <rich:menuItem submitMode="ajax" value="Rollback"></rich:menuItem>
       <rich:menuSeparator />
       <rich:menuItem submitMode="ajax" value="Lock"></rich:menuItem>
       <rich:menuItem submitMode="ajax" value="Unlock"></rich:menuItem>
       <rich:menuSeparator />
       <rich:menuItem submitMode="ajax" value="Exit"></rich:menuItem>
       </rich:dropDownMenu>
       <rich:dropDownMenu value="Help" event="onclick">
       <rich:menuItem submitMode="ajax" value="Application Help"></rich:menuItem>
       </rich:dropDownMenu>
       </rich:toolBar>
      </h:form>
      <div class="upperleft"><ui:insert name="upperleft" /></div>
      <div class="upperright"><ui:insert name="upperright" /></div>
      <div class="lowerleft"><ui:insert name="lowerleft" /></div>
      <div class="lowerright"><ui:insert name="lowerright" /></div>
      </body>
      
      </html>
      


      The "File" and "Help" text are shown but moving over them or clicking them does not make the dropdownmenu appear.

      any idea what to do?

      best regards,
      STefan.


        • 1. Re: dropdownmenu with richfaces 3.1.4 does not expand
          Stefan Siebel Newbie

          hm... looks like it's a firefox related issue. in IE7 it works fine.

          is there a possibility to get it work for firefox 2.0?

          best regards,
          Stefan.

          • 2. Re: dropdownmenu with richfaces 3.1.4 does not expand
            Stefan Siebel Newbie

            nobody has any idea?
            what is strange is, that the dropdown menu in the jboss demo application works absolutely fine in Firefox 2.0. So it might be a configuration issue.

            my web.xml looks like that:

            <?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>web</display-name>
             <!-- Use Documents Saved as *.xhtml -->
             <context-param>
             <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
             <param-value>.xhtml</param-value>
             </context-param>
             <!-- Special Debug Output for Development -->
             <context-param>
             <param-name>facelets.DEVELOPMENT</param-name>
             <param-value>true</param-value>
             </context-param>
             <!--Begin RichFaces Configuration-->
             <context-param>
             <param-name>org.richfaces.SKIN</param-name>
             <param-value>ruby</param-value>
             </context-param>
             <context-param>
             <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
             <param-value>server</param-value>
             </context-param>
             <context-param>
             <param-name>org.richfaces.LoadScriptStrategy</param-name>
             <param-value>ALL</param-value>
             </context-param>
            
             <context-param>
             <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
             <param-value>false</param-value>
             </context-param>
             <filter>
             <display-name>RichFaces Filter</display-name>
             <filter-name>richfaces</filter-name>
             <filter-class>org.ajax4jsf.Filter</filter-class>
             </filter>
             <filter-mapping>
             <filter-name>richfaces</filter-name>
             <servlet-name>Faces Servlet</servlet-name>
             <dispatcher>REQUEST</dispatcher>
             <dispatcher>FORWARD</dispatcher>
             <dispatcher>INCLUDE</dispatcher>
             </filter-mapping>
             <listener>
             <listener-class>
             com.sun.faces.config.ConfigureListener
             </listener-class>
             </listener>
             <!--End RichFaces Configuration
             Faces Servlet -->
             <servlet>
             <servlet-name>Faces Servlet</servlet-name>
             <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
             <load-on-startup>1</load-on-startup>
             </servlet>
             <!-- Faces Servlet Mapping -->
             <servlet-mapping>
             <servlet-name>Faces Servlet</servlet-name>
             <url-pattern>*.jsf</url-pattern>
             </servlet-mapping>
             <welcome-file-list>
             <welcome-file>index.jsp</welcome-file>
             </welcome-file-list>
             <login-config>
             <auth-method>BASIC</auth-method>
             </login-config>
            </web-app>
            
            


            • 3. Re: dropdownmenu with richfaces 3.1.4 does not expand
              Ilya Shaikovsky Master

              just copied both snippets and it's working for me.
              please specify JSF environment and check in fireBug if there are some JS error..

              • 4. Re: dropdownmenu with richfaces 3.1.4 does not expand
                Stefan Siebel Newbie

                it works now. the problem was that some java scripts and stylesheets were not loaded due to some bad facelet templating...