Implementing subtables in JSF 1.1
        Posted  
        
            by Xenon
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Xenon
        
        
        
        Published on 2010-06-02T14:22:20Z
        Indexed on 
            2010/06/02
            14:53 UTC
        
        
        Read the original article
        Hit count: 405
        
jsf
We're looking for a way to implement subtables in JSF 1.1. We cannot use Rich Faces due to the fact that out target server is WebSphere 6.1. I've tried JSTL and Tomahawk to no avail. Also, our project is using JSP's and not facelets.
Here's my HTML/JSTL example:
<table border="1" width="700px">
Header 1 Header 2 Header 3 Header 4 Header 5
${item.value1} ${item.value2} ${item.value3} ${item.value4} ${item.value5}
<tr>
 <td colspan="5">
  <table border="1" width="100%">
   <thead>
    <tr>
     <td>SubHeader 1</td>
     <td>SubHeader 2</td>
     <td>SubHeader 3</td>
     <td>SubHeader 4</td>
     <td>SubHeader 5</td>
    </tr>
   </thead>
   <!-- For loop iteration over subtable data -->
   <c:forEach var="subitem" items="${item.subtable}">
    <tr>
     <td>${subitem.value1}</td>
     <td>${subitem.value2}</td>
     <td>${subitem.value2}</td>
     <td>${subitem.value2}</td>
     <td>${subitem.value2}</td>
    </tr>
   </c:forEach>
  </table>
 </td>
</tr>
© Stack Overflow or respective owner