我正在尝试设计样式<displaytag>
以获得看起来很棒的东西。
官方演示如下:
http://demo.displaytag.org/displaytag-examples-1.2/example-paging.jsp
但我只得到这个:
如何更改 displaytag 的分页部分的呈现,以便页码在<li>
元素中?
提前致谢
我正在尝试设计样式<displaytag>
以获得看起来很棒的东西。
官方演示如下:
http://demo.displaytag.org/displaytag-examples-1.2/example-paging.jsp
但我只得到这个:
如何更改 displaytag 的分页部分的呈现,以便页码在<li>
元素中?
提前致谢
要自定义分页,我必须添加一个displayTag.properties
具有以下属性的文件:
paging.banner.no_items_found=<span class="pagebanner">No {0} found.</span>
paging.banner.one_item_found=<span class="pagebanner">One {0} found.</span>
paging.banner.all_items_found=<span class="pagebanner">{0} {1} found, displaying all {2}.</span>
paging.banner.some_items_found=<span class="pagebanner">{0} {1} found, displaying {2} to {3}.</span>
paging.banner.full=<div class="pagination"><ul><li class="prev disabled"><a href="{1}" class="next" title="first"><img src="static/images/first.png" alt="first" /></a></li><li class="prev disabled"><a href="{2}" class="next" title="previous"><img src="static/images/previous.png" alt="previous" /></a></li>{0}<li><a href="{3}" class="next" title="next"><img src="static/images/next.png" alt="next" /></a></li><li class="next"><a href="{4}" class="next" title="lest"><img src="static/images/last.png" alt="last" /></a></li></ul></div>
paging.banner.first=<div class="pagination"><ul><li class="prev"><a href="{1}" class="next" title="first"><img src="static/images/first.png" alt="first" /></a></li><li class="prev"><a href="{2}" class="next" title="previous"><img src="static/images/previous.png" alt="previous" /></a></li>{0}<li><a href="{3}" class="next" title="next"><img src="static/images/next.png" alt="next" /></a></li><li class="next"><a href="{4}" class="next" title="lest"><img src="static/images/last.png" alt="last" /></a></li></ul></div>
paging.banner.last=<div class="pagination"><ul><li class="prev"><a href="{1}" class="next" title="first"><img src="static/images/first.png" alt="first" /></a></li><li class="prev"><a href="{2}" class="next" title="previous"><img src="static/images/previous.png" alt="previous" /></a></li>{0}<li class="next disabled"><a href="{3}" class="next" title="next"><img src="static/images/next.png" alt="next" /></a></li><li class="next disabled"><a href="{4}" class="next" title="lest"><img src="static/images/last.png" alt="last" /></a></li></ul></div>
paging.banner.onepage=<div class="pagination"><ul>{0}</ul></div>
paging.banner.page.selected=<li><strong>{0}</strong></li>
paging.banner.page.link=<li><a href="{1}" title="Go to page {0}">{0}</a></li>
paging.banner.page.separator=
在 displayTag.properties 中:
paging.banner.placement=top
paging.banner.onepage=
paging.banner.first=<span class="pagination pagination-right"><ul>{0}<li><a href="{4}" title="\u00daltima">...{6}</a></li></ul></span>
paging.banner.full=<span class="pagination pagination-right"><ul><li><a href="{1}" title="Primeira">1\u00aa</a></li>{0}<li><a href="{4}" title="\u00daltima">...{6}</a></li></ul></span>
paging.banner.last=<span class="pagination pagination-right"><ul><li><a href="{1}" title="Primeira">1\u00aa</a></li>{0}</ul></span>
paging.banner.page.link=<li><a href="{1}" title="P\u00e1gina {0}">{0}</a></li>
paging.banner.page.selected=<li class="disabled"><span>{0}</span></li>
paging.banner.page.separator=
另一种格式