2 Replies Latest reply on Oct 3, 2008 9:04 AM by Richard van der Walt

    rich:dropDownMenu event=

    Richard van der Walt Newbie

      Good day there all

      I've been trying to get a dropDownMenu to only open when you click the image for it. The menu opens up for the image on hover if you don't specify the event and it also opens up when you have only text specified. However I havn't been able to get it to open when you click on the image.

      Here is a simplified version of what's been used, I've included all 3 scenarios in this.

      <div xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:c="http://java.sun.com/jstl/core">
      
       <ui:decorate template="/layout/templateWithMenu.xhtml">
       <ui:define name="bodyRight">
       <s:fragment id="ViewPanel">
       <a4j:form id="form">
       <h:panelGroup id="table">
       <rich:dropDownMenu id="DD1" direction="bottom-right" style="border:none;">
       <f:facet name="label">
       <h:graphicImage value="/img/strategymap/AddYMenu.gif" styleClass="peekaboo" style="z-index:0" />
       </f:facet>
       <rich:menuItem style="z-index:100" value="one" ajaxSingle="true" submitMode="ajax" />
       </rich:dropDownMenu>
       <br/><br/><br/><br/>
       <rich:dropDownMenu id="DD2" direction="bottom-right" style="border:none;" event="onclick">
       <f:facet name="label">
       <h:graphicImage value="/img/strategymap/AddYMenu.gif" styleClass="peekaboo" style="z-index:0" />
       </f:facet >
       <rich:menuItem style="z-index:100" value="two" ajaxSingle="true" submitMode="ajax"/>
       </rich:dropDownMenu>
       <br/><br/><br/><br/>
       <rich:dropDownMenu id="DD3" direction="bottom-right" style="border:none;" event="onclick" value="Three">
       <rich:menuItem style="z-index:100" value="Three" ajaxSingle="true" submitMode="ajax"/>
       </rich:dropDownMenu>
       </h:panelGroup>
       </a4j:form>
       </s:fragment>
       </ui:define>
       </ui:decorate>
      </div>
      


      I have no idea whether this is a bug or I'm doing anything wrong.

      Any questions or further information required please feel free to ask.