开发者

Nested tables with jsf datatable component

开发者 https://www.devze.com 2023-01-05 12:07 出处:网络
Does any one have an idea how to generate and populate nested tables with JSF. An example of the expected output:

Does any one have an idea how to generate and populate nested tables with JSF.

An example of the expected output:

<table align="center" width="100%" border="1">
  <tr>
    <th colspan="6" scope="col">School
</th>

  </tr>
    <tr>
    <th colspan="6" scope="col">Time
 </th&g开发者_如何学编程t;

  </tr>
    <tr>
    <th colspan="6" scope="col"> Semester </th>

  </tr>

  <tr>
    <th scope="row">Week Commencing</th>
    <th scope="row">Monday</th>
    <th scope="row">Tuesday</th>
    <th scope="row">Wednesday</th>
    <th scope="row">Thursday</th>
    <th scope="row">Friday</th>

  </tr>
  <tr>
  <td>
  <table width="100%"  border="1">
  <tr>
  <td><br /><br />12/04/10<br /><br /> </td>
    <td><table width="100%"  border="1">
  <tr><td>08:30 - 10:00</td></tr>
  <tr><td>10:15 - 11:45</td></tr>
  <tr><td>12:30 - 14:00</td></tr>
  <tr><td>14:15 - 15:45</td></tr>
  <tr><td>16:00 - 17:30</td></tr>
  </table> </td>
  </tr>
  </table>

  </td>
  <td> <table width="100%"  border="1">
  <tr ><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  </table></td>
  <td><table width="100%"  border="1">
  <tr ><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  </table></td>
  <td><table width="100%"  border="1">
  <tr ><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  </table></td>
  <td><table width="100%"  border="1">
  <tr ><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  </table></td>
  <td><table width="100%"  border="1">
  <tr ><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  <tr><td>subject</td></tr>
  </table></td>
  </tr>
</table>


Not sure if it is exactly what you want, but subtables can be created using Richfaces's <rich:subTable> inside a <rich:dataTable>. Check the example.

0

精彩评论

暂无评论...
验证码 换一张
取 消