3 Replies Latest reply on Sep 4, 2013 3:10 PM by bleathem

    How to make the entire row of a collapsibleSubTable clickable and still be able to use the toggle arrows?




      I would like to be able to click on any row of the mentioned component to toggle the sub table.


      Meaning, I want to be able to e.g. click on "Chevrolet" (or any other column, should there be more), to get the same effect I get when I click on the toggle arrows.



      I have a solution that works partially, as I am able to toggle the sub table by clicking on a row. Here are the two relevant additions to the showcase:


      <rich:dataTable value="#{carsBean.inventoryVendorLists}" var="list" onrowclick="#{rich:element('toggler')}.click();">




      <rich:collapsibleSubTableToggler id="toggler" for="sbtbl" />


      The problem with this solution is, that a click on the toggle arrows does nothing at all, because the row click and the click on the toggle arrows both get executed. Because of this, the original state (expanded or not) never changes.


      Do you have any idea, how the two clicks could be avoided? Unfortunately, the rowclick doesn't report which element within the row got clicked exactly (e.g. I get the row id when I output jQuery(this).attr('id')); on rowclick).


      Would be nice if you could help me! Thanks!