Skip to content
Snippets Groups Projects
Forked from Smart / broken-petclinic
328 commits behind the upstream repository.
  • Thibault Duchateau's avatar
    e99c67a4
    Upgraded Dandelion-Datatables to the latest release (v0.10.0) · e99c67a4
    Thibault Duchateau authored
     * The old datatables-servlet2 dependency has been removed from the pom.xml
     * Some attributes have been renamed (e.g. paginate => pageable)
     * Starting from the v0.10.0, all web components (servlet, filter) must be explicitely declared in the web.xml file. That's why I added the following declaration: DandelionFilter, DandelionServlet and DatatablesFilter
     * Added a new datatables.properties file in order to disable the asset management brought by Dandelion-Core. This is equivalent to the old cdn=true table attribute
    e99c67a4
    History
    Upgraded Dandelion-Datatables to the latest release (v0.10.0)
    Thibault Duchateau authored
     * The old datatables-servlet2 dependency has been removed from the pom.xml
     * Some attributes have been renamed (e.g. paginate => pageable)
     * Starting from the v0.10.0, all web components (servlet, filter) must be explicitely declared in the web.xml file. That's why I added the following declaration: DandelionFilter, DandelionServlet and DatatablesFilter
     * Added a new datatables.properties file in order to disable the asset management brought by Dandelion-Core. This is equivalent to the old cdn=true table attribute
ownersList.jsp 1.84 KiB
<!DOCTYPE html> 

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="datatables" uri="http://github.com/dandelion/datatables" %>

<html lang="en">

<jsp:include page="../fragments/headTag.jsp"/>

<body>
<div class="container">
    <jsp:include page="../fragments/bodyHeader.jsp"/>
    <h2>Owners</h2>
    
    <datatables:table id="owners" data="${selections}" row="owner" theme="bootstrap2" 
                      cssClass="table table-striped" pageable="false" info="false" export="pdf">
        <datatables:column title="Name" cssStyle="width: 150px;" display="html">
            <spring:url value="/owners/{ownerId}.html" var="ownerUrl">
                <spring:param name="ownerId" value="${owner.id}"/>
            </spring:url>
            <a href="${fn:escapeXml(ownerUrl)}"><c:out value="${owner.firstName} ${owner.lastName}"/></a>
        </datatables:column>
        <datatables:column title="Name" display="pdf">
            <c:out value="${owner.firstName} ${owner.lastName}"/>
        </datatables:column>
        <datatables:column title="Address" property="address" cssStyle="width: 200px;"/>
        <datatables:column title="City" property="city"/>
        <datatables:column title="Telephone" property="telephone"/>
        <datatables:column title="Pets" cssStyle="width: 100px;">
            <c:forEach var="pet" items="${owner.pets}">
                <c:out value="${pet.name}"/>
            </c:forEach>
        </datatables:column>
        <datatables:export type="pdf" cssClass="btn" cssStyle="height: 25px;" />
    </datatables:table>
    
    <jsp:include page="../fragments/footer.jsp"/>

</div>
</body>

</html>