正在阅读:解决MVC下分页显示的问题解决MVC下分页显示的问题

2005-07-12 10:07 出处: 作者:ponky 责任编辑:moningfeng

  有了自定义标签,当然少不了用于处理标签的tld,我们定义一个swsoft-struts.tld,代码如下:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">


<taglib>

<tlibversion>1.0</tlibversion>

<jspversion>1.1</jspversion>

<shortname>out</shortname>

<uri>http://www.swsoftware.com/</uri>

<info>Tab Library for PaginatorTag</info>

<tag>

<name>paginator</name>

<tagclass>com.swsoftware.tags.PaginatorTag</tagclass>

<bodycontent>JSP</bodycontent>

<info>Returns a paginator</info>

<attribute>

<name>currentPage</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>url</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>totalPut</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>maxPerPage</name>

<required>true</required>

<rtexprvalue>true</rtexprvalue>

</attribute>

<attribute>

<name>showTotal</name>

<required>true</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

<attribute>

<name>showAllPages</name>

<required>true</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

<attribute>

<name>strUnit</name>

<required>true</required>

<rtexprvalue>false</rtexprvalue>

</attribute>

</tag>

</taglib>

键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品