2 Replies Latest reply on Feb 13, 2009 2:10 AM by canvic

    How to add js effect to corresponding row of h:dataTable

    canvic

      I want to add js effect to specified row when I click specified row.
      code is as follow:

      <h:dataTable value="#{bean.list}" var="item">
       <h:graphicImage url="img/test.gif" onclick="showEffect()"></h:graphicImage>
       <rich:effect name="showEffect" targetId="table" type="BlindDown" params="duration:0.8" />
       <rich:panel id="table">
       <h:outputText value="item.name"></h:outputText>
       </rich:panel>
      </h:dataTable>
      

      I wish that when I click the image of the first row, the text of the first row will blindDown, and when I click the image of the second row, the text of the second row will blindDown. But the effect if that: I click the image of any row, just the text of last row will blindDown.
      How to solve this problem?