3 Replies Latest reply on Oct 9, 2013 2:26 PM by Brian Leathem

    a4j:ajax with rowclick event inside rich:dataTable isn't working

    Hauke Gulich Newbie

      {Hello everyone,


      -- Richfaces 4 --


      I have a simple rich:datatable and what a listener that will be noticed when I click on a row inside my table.


      What I did so far




      <rich:dataTable value="#{control.lightList}" var="licht" width="100%" id="lichtListe" columns="5" columnClasses="lightTableWidthNarrow,lightTableWidthLarge,lightTableWidthLarge,lightTableWidthNarrow,lightTableWidthLarge">

                  <a4j:ajax event="rowclick" listener="#{control.selectActiveLight}"/>



      and my bean looks like this





      public void selectActiveLight(AjaxBehaviorEvent evt) {

         logger.info("---------------------- clicked on a row ");

         UIExtendedDataTable dataTable = (UIExtendedDataTable) evt.getComponent();

         logger.info("---------------------- clicked on a row " + dataTable.getId());




      but nothing happens if I click on a row.


      The strange thing is, if I change the a4j:ajax line to




      <a4j:ajax event="rowclick" listener="#{control.selectActiveLight}" render="lichtListe"/>



      I can see in my log files, that the lichtListe (the datatable) will be reloaded. So I guess the a4j:ajax event is correct, but why isn't my listener called at all.


      Thanks a lot,