5 Replies Latest reply on Oct 22, 2010 1:39 PM by Agustin Sivoplás Ferrari

    Chrome and rich:dropDownMenu problem

    Agustin Sivoplás Ferrari Expert

      Hi everybody, i have this problem in Google Chrome (in IE and Firefox works fine) there is a bug of Richfaces? or is a Google Chrome problem?

       

      captura.png

       

      The code:

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition template="/WEB-INF/layout/layoutLogin.xhtml">
      <ui:define name="content">
      <script language ="javascript">
      function submitEnter(e){
             var keycode;
             if (window.event)
                  keycode = window.event.keyCode;
             else if (e)
                 keycode = e.which;
             else
                 return true;
             if (keycode == 13) {
                 document.getElementById("loginForm:btnLogin").onclick();
                 return false;
             } else
                 return true;
      }
      </script>
      <f:loadBundle basename="uy.com.its.itil.view.bundle.LocalizationResources" var="msg" />
      <body onload="document.getElementById('loginForm:userLoginInput').focus();">
      <fieldset>
      <h:form id="loginForm">
      <h:panelGrid style="align: center;">
      <h:inputText value="#{authenticationBean.nomUsuario}" id="userLoginInput" onkeypress="return submitEnter(event)"/>
      <h:inputSecret value="#{authenticationBean.passUsuario}" id="passwordLoginInput" onkeypress="return submitEnter(event)"/>
      <h:outputText id="labelError" value="#{authenticationBean.labelError}" styleClass="labelWhite"/>
      <h:panelGrid columns="1">
      <h:commandLink id="btnLogin" action="#{authenticationBean.login}" styleClass="ButtonYellowMedium106" onmouseover="this.style.color='#0000CC';" onmouseout="this.style.color='black';" value="#{msg.loginLinkLabel}"/>
      <rich:dropDownMenu hideDelay="50" styleClass="avanzado" itemClass="itemMenuClass">
                     <f:facet name="label">
                             <h:outputText value="#{msg.opcionesAvanzadasLabel}" style="color:white; font-weight:bold;"/>
                     </f:facet>
                     <rich:menuItem action="#{authenticationBean.reportarIncidente}">
                             <h:outputText value="#{msg.reportarIncidenteLabel}"/>
                     </rich:menuItem>
                     <rich:menuItem action="#{authenticationBean.solicitarLink}">
                             <h:outputText value="#{msg.solicitarLinkLabel}"/>
                     </rich:menuItem>
                 </rich:dropDownMenu>
      </h:panelGrid>
      </h:panelGrid>
      </h:form>
      </fieldset>
      </body>
      </ui:define>
      </ui:composition>
      </html>
      <!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">
           
      <ui:composition template="/WEB-INF/layout/layoutLogin.xhtml">
           <ui:define name="content">
           <script language ="javascript">
                function submitEnter(e){
                   var keycode;
                   if (window.event) 
                        keycode = window.event.keyCode;
                   else if (e) 
                       keycode = e.which;
                   else 
                       return true;
                   if (keycode == 13) {
                       document.getElementById("loginForm:btnLogin").onclick();
                       return false;
                   } else
                       return true;
                }
           </script> 
           <f:loadBundle basename="uy.com.its.itil.view.bundle.LocalizationResources" var="msg" />
           <body onload="document.getElementById('loginForm:userLoginInput').focus();">
                <fieldset>
                     <h:form id="loginForm">
                          <h:panelGrid style="align: center;">
                               <h:inputText value="#{authenticationBean.nomUsuario}" id="userLoginInput" onkeypress="return submitEnter(event)"/>
                               <h:inputSecret value="#{authenticationBean.passUsuario}" id="passwordLoginInput" onkeypress="return submitEnter(event)"/>
                                    <h:outputText id="labelError" value="#{authenticationBean.labelError}" styleClass="labelWhite"/>
                                    <h:panelGrid columns="1">
                                         <h:commandLink id="btnLogin" action="#{authenticationBean.login}" styleClass="ButtonYellowMedium106" onmouseover="this.style.color='#0000CC';" onmouseout="this.style.color='black';" value="#{msg.loginLinkLabel}"/>
                                         <rich:dropDownMenu hideDelay="50" styleClass="avanzado" itemClass="itemMenuClass">
                                          <f:facet name="label">
                                             <h:outputText value="#{msg.opcionesAvanzadasLabel}" style="color:white; font-weight:bold;"/>
                                          </f:facet>
                          
                                          <rich:menuItem action="#{authenticationBean.reportarIncidente}">
                                             <h:outputText value="#{msg.reportarIncidenteLabel}"/>
                                          </rich:menuItem>
                          
                                          <rich:menuItem action="#{authenticationBean.solicitarLink}">
                                             <h:outputText value="#{msg.solicitarLinkLabel}"/>
                                          </rich:menuItem>
                                      </rich:dropDownMenu>
                                    </h:panelGrid>
                          </h:panelGrid>               
                     </h:form>
                </fieldset>
           </body>
           </ui:define>
      </ui:composition>
      </html>
      

       

       

      Thanks in advanced