jQuery UI对话框在struts2分页的第二页上不起作用

时间:2018-11-21 03:36:15

标签: javascript jquery jquery-ui jquery-plugins struts2

我在一个表中有一个用户列表,我使用tablesorter分页器(分页)插件https://www.websparrow.org/struts/pagination-in-struts2-using-jquery-datatable一次仅显示10个用户 我在表中有一栏带有对话框打开选项。此对话框打开按钮仅在分页的第一页上可见,而在分页的第二页上不可见。第二页仅显示“正在加载...显示”。 我的Java脚本不是很好,因此需要您的帮助才能在分页的下一页显示对话框按钮。 请找到下面提供的代码

<sj:head jqueryui="true" jquerytheme="start" compressed='false'/> 
<style type="text/css">@import url(css/main.css) !important;</style>
<style type="text/css">
select {
    width:200px;
}</style>
<link href="/HospitalCare/css/table.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/HospitalCare/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/HospitalCare/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="/HospitalCare/layout/scripts/jquery.dataTables.min.js"></script>
<script language="JavaScript">
$(document).ready(function() {
     $('#mytbl').dataTable();
});

 </script>

 </head>
<body>

<%@include file="menu.jsp" %>
<div class="myRow1" align="center">
    <div style="margin-top: 10px; margin-left: 20px;">
        <table class="table table-hover table-bordered" id="mytbl">
            <thead>
                <tr class="success" style="color: #f5f5f5;">
                    <th>First Name </th>
                    <th>Middle Name</th>
                    <th>Last Name</th>
                    <th>Birth Date </th>
                    <th>Email Id</th>
                    <th>Marrital Status </th>
                    <th>Gender </th>
                    <th>Mobile No</th>
                    <th>Blood Group</th>
                    <th>Verified</th>
                    <th>Show Details</th>
                </tr>
            </thead>
            <s:iterator value="userList">
                <tr>
                    <td>
                        <s:property value="firstName"/>
                    </td>
                    <td>
                        <s:property value="middleName" />
                    </td>
                    <td>
                        <s:property value="lastName" />
                    </td>
                    <td>
                        <s:property value="birthday" />
                    </td>
                    <td>
                        <s:property value="emailId" />
                    </td>
                    <td>
                        <s:property value="marritalSttus" />
                    </td>
                    <td>
                        <s:property value="gender" />
                    </td>
                    <td>
                        <s:property value="mobileNo" />
                    </td>
                    <td>
                        <s:property value="bloodGroup" />
                    </td>
                    <td>
                        <s:property value="verified" />
                    </td>
                    <td>
                        <sj:dialog width="950" height="600" autoOpen="false" modal="true" id="%{get(\"userId\")}" href="showVisitHistoryTab?userId=%{userId}" openTopics="%{userId}_2" title="Visit Details">
                                <img id="indicator" src="/HospitalCare/images/indicator.gif" alt="Loading..."/>
                          </sj:dialog>
                          <sj:a onClickTopics="%{userId}_2" openDialog="%{get(\"userId\")}" button="true" buttonIcon="ui-icon-newwin" >
                          <s:property value="%{getText('label.button.show.bill')}"/>
                          </sj:a>
                    </td>
                </tr>
            </s:iterator>
        </table>
    </div>
</div>
</body>
</html>

0 个答案:

没有答案
相关问题