是否有人知道如何使用JSF生成和填充嵌套表。
预期输出的一个例子:
<table align="center" width="100%" border="1">
<tr>
<th colspan="6" scope="col">School
</th>
</tr>
<tr>
<th colspan="6" scope="col">Time
</th>
</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>
答案 0 :(得分:2)
不确定它是否正是您想要的,但可以使用<rich:dataTable>
内的Richfaces <rich:subTable>
创建子表。检查the example。