displ-110.jsp

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

JSP
36
字号
<jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page"
  xmlns:display="urn:jsptld:http://displaytag.sf.net">
  <jsp:text> <![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ]]> </jsp:text>
    <jsp:directive.page contentType="text/html; charset=UTF8"/>
  <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
      <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
      <title>Displaytag unit test</title>
    </head>
    <body>
      <jsp:scriptlet>
          request.setAttribute( "test", new Object[]{new org.displaytag.test.KnownValue(), new org.displaytag.test.KnownValue()});

          pageContext.setAttribute("dyndecorator", new org.displaytag.decorator.TableDecorator()
              {
                  public String addRowClass()
                  {
                      return "class" + evaluate("camel") + getViewIndex();
                  }

                  public String addRowId()
                  {
                      return "id" + evaluate("camel") + getViewIndex();
                  }
              });
      </jsp:scriptlet>

      <display:table name="requestScope.test" decorator="dyndecorator">
        <display:column property="ant" />
        <display:column property="bee" />
      </display:table>

    </body>
  </html>
</jsp:root>

⌨️ 快捷键说明

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