Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COI am trying to achieve the expand/contract functionality of table rows in JSF using core faces implementation. As Balus mentioned in one of my earlier thread this is not straight forward to achieve in core faces implementation. So, i thought of using HTML + JQUERY to achieve the functionality. I am calling the row with +/- gif as parent row and the rows that are to be expanded and contracted are its child rows. To make parent aware of which child it needs to show or hide, I am making use of jquery and assigning row id to each <tr>.
      singulars
    2. COIn continuation to my earlier comment above if the parent row-id="row1234", then, the child row will have row-id="row1234-child". here is the code, you would require JQuery library to run this. Jquery code: ============ <script src="jquery.js"></script><script>$(document).ready(function(){$('.expand').click(function() {if( $(this).hasClass('.hidden') ){$(this).attr("src", "plus.gif");}else{$(this).attr("src", "subtract1.gif");}$(this).toggleClass('hidden');$(this).parent().parent().siblings('#'+$(this).parent().parent().attr('id')+'-child').toggle();});});</script>
      singulars
    3. COHere is the HTML code ===================== <TR class="parent" id="row123" style="cursor: pointer; " title="Click to expand/collapse"><TD>123</TD><TD colspan="2"><img class="expand" src="plus.gif"/>ABC</TD><TD>100</TD></TR><TR ID="row123-child" style="display: none; "><TD>&nbsp;</TD><TD>2007-01-02</TD><TD>A short description</TD><TD>15</TD></TR><TR ID="row123-child" style="display: none; "><TD>&nbsp;</TD><TD>2007-02-03</TD><TD>Another description</TD><TD>45</TD></TR><TR ID="row123-child" style="display: none; "><TD>&nbsp;</TD><TD>2007-03-04</TD><TD>More Stuff</TD><TD>40</TD></TR>
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload