displaytag,spring,没有找到任何内容

时间:2017-02-08 10:07:44

标签: spring sorting html-table displaytag

我在排序表时遇到问题 并且不理解displaytag ......也许它们更容易排序 使用spring,hsql-db(后来的ms-sql)

我从id列中收到“Nothing found to display”消息 有人可以解释我的错吗?

    <c:if test="${not empty msg}">
        <div class="alert alert-${css} alert-dismissible" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <strong>${msg}</strong>
        </div>
    </c:if>

    <h1>All Users</h1>

    <table class="table table-striped">
        <thead>
            <tr>
                <th>#ID</th>
                <th>Name</th>
                <th>Email</th>
            </tr>
        </thead>

        <c:forEach var="user" items="${users}">
            <tr>
                <td>                
                <!-- this do not work-->
                <display:table name="user" export="true" id="row" >
                    <display:column sortable="true" title="ID" sortProperty="${user.id}" >
                        <c:out value="${user.id}"/>
                    </display:column>
                </display:table>
                    ${user.id}
                </td>
                <td>${user.name}</td>
                <td>${user.email}</td>
                <td>
                    <spring:url value="/users/${user.id}" var="userUrl" />
                    <spring:url value="/users/${user.id}/delete" var="deleteUrl" />
                    <spring:url value="/users/${user.id}/update" var="updateUrl" />

                    <button class="btn btn-info" onclick="location.href='${userUrl}'">Details</button>
                    <button class="btn btn-primary" onclick="location.href='${updateUrl}'">Update</button>
                    <button class="btn btn-danger" onclick="this.disabled=true;post('${deleteUrl}')" data-toggle="tooltip" title="${user.name}">Delete</button>
                    <button type="button" class="btn btn-warning" data-toggle="modal" data-target="#${user.name}" title="${user.name}">delete-test-button</button>

                    <!-- Modal delete Button-->
                      <div class="modal fade" id="${user.name}" role="dialog">
                        <div class="modal-dialog">
                          <!-- Modal content-->
                          <div class="modal-content">
                            <div class="modal-header">
                              <button type="button" class="close" data-dismiss="modal">&times;</button>
                              <h4 class="modal-title">Modal Header</h4>
                            </div>
                            <div class="modal-body">
                              <p>delete User ${user.name} ?</p>
                            </div>
                            <div class="modal-footer">
                              <button type="button" class="btn btn-default" data-dismiss="modal" onclick="this.disabled=true;post('${deleteUrl}')" 
                                data-toggle="tooltip" title="${user.name}" data-placement="left">OK</button>
                              <button type="button" class="btn btn-default" data-dismiss="modal">cancel</button>
                            </div>
                          </div>
                        </div>
                      </div>

                </td>
            </tr>
        </c:forEach>
    </table>

</div>

0 个答案:

没有答案