0 Replies Latest reply on Jul 3, 2007 7:33 AM by Pasquale Renna

    First two mouse clicks lost for Ajax components

    Pasquale Renna Newbie

      I know this problem has always been discussed in the past (for instance http://jboss.com/index.html?module=bb&op=viewtopic&t=109516 ), but I can't fix it when using Websphere Process Server 6.0.

      In my sample project I'm using:

      ajax4jsf-1.1.1.jar
      commons-beanutils-1.7.0.jar
      commons-collections-3.2.jar
      commons-digester-1.8.jar
      commons-logging-1.0.4.jar
      jsf-api-1.1_02.jar
      jsf-impl-1.1_02.jar
      jstl-1.1.2.jar
      richfaces-3.0.1.jar

      You can recreate the problem with the following page:

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <%-- jsf:pagecode language="java" location="/JavaSource/pagecode/CompilazioneRichiesta.java" --%><%-- /jsf:pagecode --%>
      <%@page language="java" contentType="text/html; charset=ISO-8859-1"
       pageEncoding="ISO-8859-1"%>
      <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
      <%@taglib prefix="a4j" uri="https://ajax4jsf.dev.java.net/ajax"%>
      
      <html>
      <head>
      <title>Compilazione Richiesta</title>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
      <meta name="GENERATOR" content="Rational Software Architect">
      <link rel="stylesheet" type="text/css" href="theme/stylesheet.css"
       title="Style">
      <link rel="stylesheet" type="text/css" href="theme/tabpanel.css"
       title="Style">
      <link rel="stylesheet" type="text/css" href="theme/styles.css"
       title="Style">
      </head>
      
      <script type="text/javascript">
      function conferma(operazione){
       var answer=confirm("Si vuole realmente effettuare " +operazione);
      
       if (answer) {
       return true;
       } else {
       alert("Operazione non effettuata");
       return false;
       }
      }
      </script>
      <f:view>
       <body>
      
      <a4j:log />
      
       <h:form id="compilazioneRichiestaForm" styleClass="form">
      
      <rich:tabPanel switchType="ajax" id="mainTab">
      
       <!-- TAB PANEL VERTICALE-->
       <!-- QUADRI -->
      
       <rich:tab label="Quadri" name="tabQuadri">
      
       <rich:togglePanel id="tabPanelNotebook" value="Anagrafico" switchType="ajax" stateOrder="Anagrafico, Rischio, CentraleRischi">
      
       <!-- TAB PANEL VERTICALE ANAGRAFICO -->
      
       <f:facet name="Anagrafico">
       <h:panelGrid id="anagraficoPanel" columns="2">
      
       <rich:panel id="anagraficoPanelLeft">
      
       <h:panelGrid styleClass="Ricerca" columns="1" border="1" >
      
       <h:panelGrid columns="3" >
       <h:graphicImage url="images/luna-mini.jpg" />
       <h:graphicImage url="images/MenuQuadri/QuadroAnagraficoSel.png" styleClass="TabPanelVerticaleImgSel" />
       <a4j:commandButton id="AnagraficoValidateButtonAnagrafico"
       image="#{userData.dettagliRichiestaCorrente.quadri['anagrafico'].imgValidato}"
       action="#{userData.dettagliRichiestaCorrente.quadri['anagrafico'].cambiaStatoValidazioneQuadro}"
       reRender="InoltraButton,AnagraficoValidateButtonAnagrafico"/>
       </h:panelGrid>
      
       <h:panelGrid columns="3" >
       <h:graphicImage url="images/luna-mini.jpg" />
       <rich:toggleControl for="tabPanelNotebook" switchToState="Rischio" styleClass="TabPanelVerticaleImg">
       <h:graphicImage url="images/MenuQuadri/QuadroRischio.png"/>
       </rich:toggleControl>
       <a4j:commandButton id="AnagraficoValidateButtonRischio"
       image="#{userData.dettagliRichiestaCorrente.quadri['rischio'].imgValidato}"
       action="#{userData.dettagliRichiestaCorrente.quadri['rischio'].cambiaStatoValidazioneQuadro}"
       reRender="InoltraButton,AnagraficoValidateButtonRischio"/>
       </h:panelGrid>
      
       <h:panelGrid columns="3" >
       <h:graphicImage url="images/luna-mini.jpg" />
       <rich:toggleControl for="tabPanelNotebook" switchToState="CentraleRischi" styleClass="TabPanelVerticaleImg">
       <h:graphicImage url="images/MenuQuadri/QuadroCentraleRischi.png"/>
       </rich:toggleControl>
       <a4j:commandButton id="AnagraficoValidateButtonCentraleRischi"
       image="#{userData.dettagliRichiestaCorrente.quadri['centrale_rischi'].imgValidato}"
       action="#{userData.dettagliRichiestaCorrente.quadri['centrale_rischi'].cambiaStatoValidazioneQuadro}"
       reRender="InoltraButton,AnagraficoValidateButtonCentraleRischi"/>
       </h:panelGrid>
       </h:panelGrid>
       </rich:panel>
      
       <rich:panel id="anagraficoPanelBody">
       <h:outputText value="Anagrafico"/>
       </rich:panel>
       </h:panelGrid>
       </f:facet>
      
      
      
      
       <!-- QUADRO RISCHIO -->
      
       <f:facet name="Rischio">
       <h:panelGrid id="rischioPanel" columns="2">
      
       <rich:panel id="RischioPanelLeft">
      
       <h:panelGrid styleClass="Ricerca" columns="1" border="1" >
      
       <h:panelGrid columns="3" >
       <h:graphicImage url="images/luna-mini.jpg" />
       <rich:toggleControl for="tabPanelNotebook" switchToState="Anagrafico" styleClass="TabPanelVerticaleImg">
       <h:graphicImage url="images/MenuQuadri/QuadroAnagrafico.png"/>
       </rich:toggleControl>
       <a4j:commandButton id="RischioValidateButtonAnagrafico"
       image="#{userData.dettagliRichiestaCorrente.quadri['anagrafico'].imgValidato}"
       action="#{userData.dettagliRichiestaCorrente.quadri['anagrafico'].cambiaStatoValidazioneQuadro}"
       reRender="InoltraButton,RischioValidateButtonAnagrafico"/>
       </h:panelGrid>
      
       <h:panelGrid columns="3" >
       <h:graphicImage url="images/luna-mini.jpg" />
       <h:graphicImage url="images/MenuQuadri/QuadroRischioSel.png" styleClass="TabPanelVerticaleImgSel"/>
       <a4j:commandButton id="RischioValidateButtonRischio"
       image="#{userData.dettagliRichiestaCorrente.quadri['rischio'].imgValidato}"
       action="#{userData.dettagliRichiestaCorrente.quadri['rischio'].cambiaStatoValidazioneQuadro}"
       reRender="InoltraButton,RischioValidateButtonRischio"/>
       </h:panelGrid>
      
       <h:panelGrid columns="3" >
       <h:graphicImage url="images/luna-mini.jpg" />
       <rich:toggleControl for="tabPanelNotebook" switchToState="CentraleRischi" styleClass="TabPanelVerticaleImg">
       <h:graphicImage url="images/MenuQuadri/QuadroCentraleRischi.png"/>
       </rich:toggleControl>
       <a4j:commandButton id="RischioValidateButtonCentraleRischi"
       image="#{userData.dettagliRichiestaCorrente.quadri['centrale_rischi'].imgValidato}"
       action="#{userData.dettagliRichiestaCorrente.quadri['centrale_rischi'].cambiaStatoValidazioneQuadro}"
       reRender="InoltraButton,RischioValidateButtonCentraleRischi"/>
       </h:panelGrid>
       </h:panelGrid>
       </rich:panel>
      
       <rich:panel id="rischioPanelBody">
       <h:outputText value="Rischio"/>
       </rich:panel>
      
       </h:panelGrid>
       </f:facet>
      
      
       <!-- QUADRO CENTRALE RISCHI -->
      
       <f:facet name="CentraleRischi">
       <h:panelGrid id="centraleRischiPanel" columns="2">
      
       <rich:panel id="centraleRischiPanelLeft">
      
       <h:panelGrid styleClass="Ricerca" columns="1" border="1" >
      
       <h:panelGrid columns="3" >
       <h:graphicImage url="images/luna-mini.jpg" />
       <rich:toggleControl for="tabPanelNotebook" switchToState="Anagrafico" styleClass="TabPanelVerticaleImg">
       <h:graphicImage url="images/MenuQuadri/QuadroAnagrafico.png"/>
       </rich:toggleControl>
       <a4j:commandButton id="CentraleRischiValidateButtonAnagrafico"
       image="#{userData.dettagliRichiestaCorrente.quadri['anagrafico'].imgValidato}"
       action="#{userData.dettagliRichiestaCorrente.quadri['anagrafico'].cambiaStatoValidazioneQuadro}"
       reRender="InoltraButton,CentraleRischiValidateButtonAnagrafico"/>
       </h:panelGrid>
      
       <h:panelGrid columns="3" >
       <h:graphicImage url="images/luna-mini.jpg" />
       <rich:toggleControl for="tabPanelNotebook" switchToState="Rischio" styleClass="TabPanelVerticaleImg">
       <h:graphicImage url="images/MenuQuadri/QuadroRischio.png"/>
       </rich:toggleControl>
       <a4j:commandButton id="CentraleRischiValidateButtonRischio"
       image="#{userData.dettagliRichiestaCorrente.quadri['rischio'].imgValidato}"
       action="#{userData.dettagliRichiestaCorrente.quadri['rischio'].cambiaStatoValidazioneQuadro}"
       reRender="InoltraButton,CentraleRischiValidateButtonRischio"/>
       </h:panelGrid>
      
       <h:panelGrid columns="3" >
       <h:graphicImage url="images/luna-mini.jpg" />
       <h:graphicImage url="images/MenuQuadri/QuadroCentraleRischiSel.png" styleClass="TabPanelVerticaleImgSel"/>
       <a4j:commandButton id="CentraleRischiValidateButtonCentraleRischi"
       image="#{userData.dettagliRichiestaCorrente.quadri['centrale_rischi'].imgValidato}"
       action="#{userData.dettagliRichiestaCorrente.quadri['centrale_rischi'].cambiaStatoValidazioneQuadro}"
       reRender="InoltraButton,CentraleRischiValidateButtonCentraleRischi"/>
       </h:panelGrid>
       </h:panelGrid>
       </rich:panel>
      
       <rich:panel id="centraleRischiPanelBody">
       <h:outputText value="CentraleRischi"/>
       </rich:panel>
       </h:panelGrid>
      </f:facet>
       </rich:togglePanel>
      
       </rich:tab>
      
       <rich:tab label="Prenotazioni" name="tabPrenotazioni" >
       <h:outputText value="prenotazioni"/>
       </rich:tab>
      
       <rich:tab label="Valutazioni" name="tabValutazioni">
       <h:outputText value="valutzioni"/>
       </rich:tab>
      </rich:tabPanel>
      
      
       </h:form>
      
       </body>
      </f:view>
      </html>
      


      Under Tomcat 6 it works fine, but under WPS you need two clicks before the vertical menu begins to switch between panels. In addition, the same problem is encountered in other application sections, for instance when firing OnRowClick events through a DataTable.

      Thanks in advance for your help.