<tr>
<th width= "8%" >
Serial number
</th>
<th width= "20%" >
Venue name
</th>
<th width= "26%" >
Start time
</th>
<th width= "26%" >
End time
</th>
<th width= "20%" >
Application Status
</th>
</tr>
<%int index = 1;%>
<s:iterator var= "s" value= "#request. Usagelist" >
<tr>
<TD style= "Text-align:center" >
<%=index++%>
</td>
<s:if test= "#strid!= #s. room_id" >
<s:set id= "Strid" value= "%{#s. room_id}"/>
<TD rowspan= "<s:property value= total_rows"/> "id=" <s:property "value=" room_id "/>" style=: Center ">
<a href= "javascript:window.location.href= ' <%=path%>/conference_room_view.action?room_id=<s:property Value= "room_id"/>&optype=2 '; " >
<s:property value= "Room_name"/>
</a>
</td>
</s:if>
<TD style= "Text-align:center" >
<s:date name= "start_date" format= "Yyyy-mm-dd HH:mm:ss"/>
</td>
<td>
<s:date name= "end_date" format= "Yyyy-mm-dd HH:mm:ss"/>
</td>
<TD style= "Text-align:center" >
<%=commonmethod.getconferencestatus ((String) Request.getattribute ("STATUS")%>
</td>
</tr>
</s:iterator>
Explain it, the future of the province will not remember when you see it.
The key is the Red section, which displays all the requests for each conference room, so a one-to-many relationship is between the conference room and the application record.
Each cycle is judged once, to see if the current record of the room_id is the same as the last, if the same as the conference room name TD is not constructed. If not the same, the description is the new conference room, then claims TD.
rowspan= "<s:property value=" Total_rows "/>"
This is the soul.
When the first generation of TD to set up TD's account for the number of lines, so you can achieve a one-to-many display. But how this total_rows is going to depend on the SQL Analytics function:
COUNT (ROWID) over (PARTITION by room_id) total_rows
Add the above item in the query item, OK. What do you mean, take a look at the SQL explanation yourself (ORACLE).
The drawback is that if the page is displayed, the effect is not ideal.