我是在动态内容的jsp页面中做这种排序技术的新手。我的应用程序与 struts2+jsp+hibenate 集成。我在jsp中使用以下代码。
报告.jsp
<table class="report_view_table" id="results">
<thead>
<tr> <th width="35" scope="col" abbr="no">No
</td>
<th width="50" scope="col" abbr="status">Date
</td>
<th width="80" scope="col" abbr="option">productName
</td>
</tr>
</thead>
<tbody>
<s:if test="resultList.size() > 0">
<s:if test="productName.size() > 0">
<s:iterator status="rowNo" value="resultList">
<s:set name="Result_product" value="%{productId}" />
<tr> <td><span class="check"><s:property value="%{#rowNo.count}" /></span></td>
<td><span class="check"><s:property value="%{proDate}" /></span></td>
<td><span class="check"><s:iterator value="productName">
<s:set name="product"value="%{productId}" />
<s:if test="%{#product== #Result_product}">
<s:property value="%{productionName}" /> </s:if></s:iterator>
</span></td>
</tr>
</s:iterator>
</s:if>
</s:if>
<s:else>No report is available
</s:else>
<s:else>No report is available
</s:else>
</tbody>
</table>
在这里,我想按列标题对表格进行排序。如何对表格的这个动态内容进行排序。任何人都请帮我做这个功能。提前谢谢。