example-caption-footer.jsp

来自「一个比较不错的java分页标签,有源代码,开发者 可以学习学习」· JSP 代码 · 共 37 行

JSP
37
字号
<jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:display="urn:jsptld:http://displaytag.sf.net">
  <jsp:directive.page contentType="text/html; charset=UTF-8" />
  <jsp:directive.page import="org.displaytag.sample.*" />
  <jsp:include page="inc/header.jsp" flush="true" />

  <jsp:scriptlet> request.setAttribute( "test", new TestList(10, false) ); </jsp:scriptlet>


  <h2>Caption &amp;amp; footer</h2>

  <display:table name="test">
    <display:caption>this is a table caption</display:caption>
    <display:column property="id" title="ID" />
    <display:column property="name" />
    <display:column property="email" />
    <display:column property="status" />
    <display:column property="description" title="Comments" />
    <display:footer>
      <tr>
        <td colspan="4">sample footer</td>
        <td>any sum or custom code can go here</td>
      </tr>
    </display:footer>
  </display:table>


  <p>You can use the <code><![CDATA[&lt;display:caption>]]></code> tag to add a caption to your table. The caption tag
  should be nested directly into the table tag. It supports all the standard html caption tag attributes (title, id,
  class, style, lang and dir).</p>
  <p>If you need to add a table footer with totals, static code, etc. you can nest a <code><![CDATA[&lt;table:footer>]]></code>
  tag inside the main table tag. All the content in the footer will be evaluated only once and written at the end of the
  table, wrapped in a tfoot html tag.</p>

  <jsp:include page="inc/footer.jsp" flush="true" />

</jsp:root>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?