1 Reply Latest reply on Nov 2, 2011 6:06 AM by Tao Liu

    rowclick event on datatable combination

    Hauke Gulich Newbie

      Hello,

       

      is there a possibility to call a a4j:jsFunction at rowclick and to change the style of the clicked row at the same time?

       

      I have something like this:

       

       

      {code:xml}

      <a4j:jsFunction name="selectLight" render="timerListe, createTimerButton" action="#{control.selectLight}">

                  <a4j:param name="param1" assignTo="#{control.selectedLightID}"  />                 

      </a4j:jsFunction>

       

      <rich:dataTable value="#{control.lightList}" onrowclick="selectLight(#{licht['id'].integerValue})".......

       

      {code}

       

      This will call the js function as soon as I click on the row.

       

      I also can do something like this:

       

       

      {code:xml}

      onRowMouseOver="this.style.backgroundColor='#F1F1F1'"

      {code}

       

      but can I combine both?

       

      Regards,

      Hauke