JesseeSong 2019-11-04 16:06 采纳率: 0%
浏览 315

jsp罗列多个list怎样分页


```后台查不同的表生成多个list,同时返回到jsp 去共同的几个属性展示,怎样实现分页。
    <table class='table table-hover' width="100%" align="center" >
                <thead>
                    <tr>
                        <th class="text-center text-nowrap">船舶识别号</th>
                        <th class="text-center text-nowrap">船舶IMO号</th>
                        <th class="text-center text-nowrap">中文船名</th>
                        <th class="text-center text-nowrap">英文船名</th>
                        <th class="text-center text-nowrap">船舶国籍</th>
                        <th class="text-center text-nowrap">船舶登记号</th>
                        <th class="text-center text-nowrap">初次登记号</th>
                        <th class="text-center text-nowrap">船舶种类</th>
                        <th class="text-center text-nowrap">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <s:iterator value="shipPoList" id="data"  >
                    <tr>
                        <td class="text-center text-nowrap"><s:property value="ship_id"/>
                        </td>
                        <td class="text-center text-nowrap"><s:property value="ship_imo"/></td> 
                        <td class="text-center text-nowrap"><s:property value="ship_name_cn"/></td>
                        <td class="text-center text-nowrap"><s:property value="ship_name_en"/></td>
                        <td class="text-center text-nowrap">中国</td>
                        <td class="text-center text-nowrap"><s:property value="ship_reg_no"/></td>  
                        <td class="text-center text-nowrap"><s:property value="ship_firstreg_no"/></td> 
                        <td class="text-center text-nowrap">
                            <s:if test='ship_type_code=="1001"'><paramc:display type="tagManningshipCertCateYc" property="ship_type_code" name="data" /></s:if>
                            <s:else><paramc:display type="tagManningshipCertCate" property="ship_type_code" name="data" /></s:else> 
                        </td>
                        <td class="text-center text-nowrap">
                            <input type="button" class="btn btn-primary" value="选&nbsp;&nbsp;择"
                                onclick=" toQueryShipInfo(
                                    '<s:property value="ship_id"/>','<s:property value="ship_type_code"/>','<s:property value="ship_name_cn"/>','<s:property value="ship_grosston"/>'
                                    ,'<s:property value="ship_imo"/>','<s:property value="remark"/>', '<s:property value="regport_code"/>'
                                    ,'<s:property value="ship_engine_power"/>','<s:property value="sailingarea_code"/>','125')"/>
                        </td>
                    </tr>
                    </s:iterator>
                    <s:iterator value="shipInfoPoList" id="data"  >
                    <tr>
                        <td class="text-center text-nowrap"><s:property value="ship_id"/>
                        </td>
                        <td class="text-center text-nowrap"><s:property value="imo_no"/></td>   
                        <td class="text-center text-nowrap"><s:property value="ship_name_cn"/></td>
                        <td class="text-center text-nowrap"><s:property value="ship_name_en"/></td>
                        <td class="text-center text-nowrap"><paramc:display type="tagGj" property="ship_nation" name="data" /></td> 
                        <td class="text-center text-nowrap"><s:property value="ship_regi_no"/></td> 
                        <td class="text-center text-nowrap"><s:property value="ship_firstreg_no"/></td> 
                        <td class="text-center text-nowrap">
                            <s:if test='ship_class_code=="1001"'><paramc:display type="tagManningshipCertCateYc" property="ship_class_code" name="data" /></s:if>
                            <s:else><paramc:display type="tagManningshipCertCate" property="ship_class_code" name="data" /></s:else>    
                        </td>
                        <td class="text-center text-nowrap">
                            <input type="button" class="btn btn-primary" value="选&nbsp;&nbsp;择"
                                onclick="toQueryShipInfo(
                                    '<s:property value="ship_id"/>','<s:property value="ship_class_code"/>','<s:property value="ship_name_cn"/>','<s:property value="ship_grosston"/>'
                                    ,'<s:property value="imo_no"/>','<s:property value="remark"/>','<s:property value="org_code"/>'   
                                    ,'<s:property value="ship_engine_power"/>','15','<s:property value="ship_nation"/>')"/>             
                        </td>
                    </tr>
                    </s:iterator>
                    <s:iterator value="servMannshipInfoPoList" id="data"  >
                        <tr>
                            <td class="text-center text-nowrap"><s:property value="ship_id"/>
                            </td>
                            <td class="text-center text-nowrap"><s:property value="imo_no"/></td>
                            <td class="text-center text-nowrap"><s:property value="ship_name_cn"/></td>
                            <td class="text-center text-nowrap"><s:property value="ship_name_en"/></td>
                            <td class="text-center text-nowrap"><paramc:display type="tagGj" property="ship_nation" name="data" /></td>
                            <td class="text-center text-nowrap"><s:property value="ship_regi_no"/></td>
                            <td class="text-center text-nowrap"><s:property value="ship_firstreg_no"/></td>
                            <td class="text-center text-nowrap">
                                <s:if test='ship_class_code=="1001"'><paramc:display type="tagManningshipCertCateYc" property="ship_class_code" name="data" /></s:if>
                                <s:else><paramc:display type="tagManningshipCertCate" property="ship_class_code" name="data" /></s:else>
                            </td>
                            <td class="text-center text-nowrap">
                                <input type="button" class="btn btn-primary" value="选&nbsp;&nbsp;择"
                                       onclick="toQueryShipInfo(
                                               '<s:property value="ship_id"/>','<s:property value="ship_class_code"/>','<s:property value="ship_name_cn"/>','<s:property value="ship_grosston"/>'
                                               ,'<s:property value="imo_no"/>','<s:property value="remark"/>','<s:property value="report_org"/>'
                                               ,'<s:property value="ship_engine_power"/>','15','<s:property value="ship_nation"/>')"/>
                            </td>
                        </tr>
                    </s:iterator>
                    <s:if test='query_flag=="1"'>
                        <tr align="left">
                            <td colspan="6">
                                <s:if test='shipPo.alter_flag=="0"'>
                                    <font>未查询到相应的见习船舶信息,请联系直属海事局进行见习船舶维护!</font>
                                </s:if>
                                <s:else>
                                    <font>未查询到相应的见习船舶信息!</font>
                                </s:else>
                            </td>
                        </tr>
                    </s:if>
                </tbody>
            </table>
  • 写回答

1条回答 默认 最新

  • tkzc_shark 2019-11-04 16:20
    关注

    后台组合为一个list,并更新Page

    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?