2 Replies Latest reply on Aug 2, 2011 4:18 PM by Kiran Kumar

    jQuery-bug after update to richfaces 3.3.1.GA ?!

    Ingo Dietz Newbie

      Hi,

      i'm using jQuery to mark and unmark a selected row in a dataTable. All was working fine in all browers before update to richfaces 3.3.1.GA.

      After the update to richfaces 3.3.1.GA "removeClass" is not working in firefox (3.0.10) and Opera (9.00) anymore. ,so that the "old" marked row is not unmarked after a click on another row. IE-brower and Safari (3.1.2 for Windows) are ok. I didn't try more browsers.

      Here is my code:

      <rich:dataTable value="#{receivables}" var="item"
       id="tableReceivable" rows="0" rowKeyVar="rkvRec" >
      
       <a4j:support event="onRowClick"
       action="#{orderHandler.loadPositions(item)}"
       reRender="tablePositions"
       status="processStatus">
       <a4j:actionparam name="clickedRkvRec" value="#{rkvRec + 1}" assignTo="#{panel.selectedRow}"/>
       </a4j:support>
      
       ...
      </rich:dataTable>
      
      <rich:jQuery selector="#tableReceivable tr:nth-child(#{panel.selectedRow})"
       query="addClass('rowSelected')"/>
      <rich:jQuery selector="#tableReceivable tr"
       query="click(function(){
       jQuery(this).siblings('tr').removeClass('rowSelected');
       jQuery(this).addClass('rowSelected')})"/>
      


      It seems that 'jQuery(this).siblings('tr').removeClass('rowSelected');' isn't working anymore.

      Just for info, because here is an onClick / onRowClick event, too: the 'a4j:support' is needed to load a childrecord of the selected parent (tableReceivable) in a second table (tablePositions).

      Any ideas or is it a bug (in jquery/richfaces 3.3.1.GA)?

      Many thanks for your help.
      tarsia