3 Replies Latest reply on Jul 9, 2009 6:12 AM by Nick Belaevski

    Failure at sort list on <rich:dataTable> using Google Chrome

    Victor Hugo Molinar Newbie

      Hello everybody.
      I'm having some dificults to solve a problem of ordering a <rich:dataTable> component using Google Chrome Browser. I've recognized that when I have a <rich:toolTip> component binding a <rich:Column> it's not possible to sort the list, because probably any of the components, that i'm using, have a bug.

      On google Chrome when i try to sort this table, so the component hide all my rows as if the rendered condition was false. And this failure only and only happens when I've a <rich:toolTip> inside a <rich:dataTable> binding some of the <rich:Column> that I'm trying to sort.

      Here's my code below:

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:a4j="http://richfaces.org/a4j"
       template="layout/template.xhtml">
      
       <ui:define name="body">
       <h2>Justificativas</h2>
       <p><h:outputText value="Passe o mouse sobre um item para visualizar a justificativa. Clique sobre um item para aprovar ou reprovar a mesma." /></p>
       <a4j:region>
       <a4j:form>
       <rich:contextMenu attached="false" submitMode="ajax" id="justContextMenu">
       <rich:menuItem ajaxSingle="true" action="#{justBean.aprove(justBean.byId)}" value="Aprovar" reRender="pendentJust, JustHourConf" icon="/img/ok.gif" oncomplete="#{rich:component('JustHourConf')}.show()">
       <a4j:actionparam assignTo="#{justBean.id}" value="{idJ}"/>
       </rich:menuItem>
       <rich:menuItem ajaxSingle="true" action="#{justBean.reprove(justBean.byId)}" value="Reprovar" reRender="pendentJust, JustHourConf" icon="/img/delete.gif" oncomplete="#{rich:component('JustHourConf')}.show()">
       <a4j:actionparam assignTo="#{justBean.id}" value="{idJ}"/>
       </rich:menuItem>
       </rich:contextMenu>
       <rich:dataTable sortMode="single" value="#{justificativas}" var="j" id="pendentJust" styleClass="justTable" rows="10" rendered="#{justificativas.rowCount > 0}" rowClasses="asd, even" >
       <rich:column sortBy="#{j.funcionario.nome}">
       <f:facet name="header">
       <h:outputText value="Nome do Funcionário" />
       </f:facet>
       <span id="_#{j.id}#{j.funcionario.id}" class="line">
       <h:outputText value="#{j.funcionario.nome}" />
       </span>
       <rich:componentControl attachTo="_#{j.id}#{j.funcionario.id}" event="oncontextmenu" for="justContextMenu" operation="show">
       <f:param value="#{j.id}" name="idJ"/>
       </rich:componentControl>
       <rich:toolTip for="_#{j.id}#{j.funcionario.id}" event="onmouseover" mode="client" followMouse="true">
       <p><h:outputText value="#{j.justificativa}" /></p>
       </rich:toolTip>
       </rich:column>
       <rich:column sortBy="#{j.date.time}">
       <f:facet name="header">
       <h:outputText value="Data" />
       </f:facet>
       <span id="#{j.id}" class="line">
       <h:outputText value="#{j.date.time}">
       <f:convertDateTime type="date" pattern="dd/MM/yyyy"/>
       </h:outputText>
       </span>
       <rich:componentControl attachTo="#{j.id}" event="oncontextmenu" for="justContextMenu" operation="show">
       <f:param value="#{j.id}" name="idJ"/>
       </rich:componentControl>
       <rich:toolTip for="#{j.id}" event="onmouseover" mode="client" followMouse="true">
       <p><h:outputText value="#{j.justificativa}" /></p>
       </rich:toolTip>
       </rich:column>
       <rich:componentControl event="onRowClick" for="justContextMenu" operation="show">
       <f:param value="#{j.id}" name="idJ" />
       </rich:componentControl>
       </rich:dataTable>
       <rich:datascroller for="pendentJust" rendered="#{justificativas.rowCount > 1}" />
       <h:outputText style="font-weight: bold;" value="Não existem justificativas." rendered="#{justificativas.rowCount == 0}" />
       <!--<rich:jQuery selector=".justTable tbody tr:even,.wrongTable tbody tr:even" query="addClass('even')" timing="onload"/>-->
      
       <rich:modalPanel resizeable="false" id="JustHourConf" width="120" height="90" rendered="#{identity.loggedIn}">
       <f:facet name="header">
       Confirmação:
       </f:facet>
       <f:facet name="controls">
       <h:outputLink value="#" >
       <h:graphicImage value="/img/close.png" alt="fechar"/>
       <rich:componentControl for="JustHourConf" operation="hide" event="onclick"/>
       </h:outputLink>
       </f:facet>
       <h:outputText value="#{justBean.statusJust}"/>
       </rich:modalPanel>
       </a4j:form>
       </a4j:region>
       </ui:define>
      
      </ui:composition>
      



      Can someone help me? I need to know if it's a component bug. If it isn't, can someone tell my what to do?
      Att;