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 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度