Setproperty of displaytag

Source: Internet
Author: User

Yesterday, I received a new requirement from a user: "When querying, if displaytag has only one page, I want to be able to process the page number label at the bottom of displaytag to make it consistent with the display mode of multiple pages. "The displaytag label is not displayed when only one page is displayed. It is also reasonable to see the last page of the previous page on the homepage. but the user needs to be nice. you can only find a solution. the first thought is to change the displaytag. no source code is included in the package. only online materials are available. you can use setproperty to solve this problem.
First, directly find a single table.
<Display: setproperty name = "paging. banner. onepage "value = '<SPAN class =" pagelinks "> [<a href =" {1} "> homepage </a>/<a href =" {2} "> previous Page </a>] {0} [<a href = "{3}"> next page </a>/<a href = "{4}"> last page </ >] </span> '/>
Later I thought that every change was troublesome. set a displaytag under the class path. properties file. it turns out that all displaytags are in English. modify the file name to displaytag_zh_cn.properties. The method for converting the properties file to Chinese is java_home/bin/native2ascii-encoding gbk d:/src/resources. properties D:/classes/resources. properties.

Search for the variable that can be modified by setproperty (this has been found for a long time. At first, I only want to search for Chinese characters. Finally, I only watch English on the official website .)
Http://displaytag.sourceforge.net/10/configuration.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.