Nonsense is not much to say, the specific code looks like this:
<span style= "FONT-SIZE:14PX;" > <%@ taglib prefix= "C" uri= "Http://java.sun.com/jsp/jstl/core"%> <table width= "100%" border= "0" cellspacing= "0" cellpadding= "0" > <tr> <th> Report name </th> </tr> <c:set var= "Tempcount" va Lue= "0" ></c:set><%--temporary variable--%> <c:set var= "rowspancount" value= "0" ></c:set><%--record number of merged columns --%> <c:set var= "tempfrist" value= "0" ></c:set><%--record merge start location--%> <c:set var= "TempEnd"- 1 "></c:set><%--record merge end position--%> <c:foreach items=" ${list "var=" Accountconfig "status" > <tr> <%--Use a result set list<bean> to generate, too much data will aggravate customer--%> <c:if test= "${status.index>=tempend}" > <c:set var= "rowspancount" value= "0" ></c:set><%--clear historical data--%> <c:foreach var= "item2" items= "$ {list} "varstatus=" Status2 > <%--tablename refers to the properties to be merged--%> <c:if test= "${accountconfig.tablename== Item2.tablename} "> <c:set var=" TeMpfrist "value=" ${status.index} "></c:set> <c:set var=" Rowspancount "value=" ${rowspancount+1} "></ c:set> <c:set var= "tempend" value= "${tempfrist+rowspancount}" ></c:set> </c:if> </c:foreach&
Gt </c:if> <c:if test= "${status.index==tempfrist}" > <td rowspan= "${rowspancount}" > <%-- TableName refers to the properties to be merged--%> ${accountconfig.tablename} </td> </c:if> </tr> </c:forEach> </ta Ble> </span>
The above is a small set of JSP to introduce dynamic merged cells in the example code, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!