クラス PaginationInfo
java.lang.Object
org.terasoluna.gfw.web.pagination.PaginationInfo
Holds all the information required by the
PaginationTag
to display pagination functionality. -
ネストされたクラスの概要
ネストされたクラス -
フィールドの概要
フィールド修飾子とタイプフィールド説明static final String
Anchor Elementstatic final String
class attributestatic final String
Value of "class" attribute of anchor tag of paginationstatic final String
Class name that enables the linkstatic final String
Class name that enables the linkstatic final String
Anchor link which is set when the link is disabled.static final String
Display text of the link of back to the topstatic final String
Value of "class" attribute of inner tag of paginationstatic final String
Inner tag of HTML that make up paginationstatic final String
Display text of the link to forward to the last pagestatic final int
Indicates the default value for maximum display countstatic final String
Display text of the link to proceed to the nextstatic final String
Value of "class" attribute of outer tag of paginationstatic final String
Outer tag of HTML that make up paginationstatic final String
Default path template of paginationstatic final String
Display text of the link of back to previousstatic final String
Default query template of paginationstatic final String
href attributestatic final String
page keystatic final String
Key name of sizestatic final String
Property keystatic final String
Property key -
コンストラクタの概要
コンストラクタコンストラクタ説明PaginationInfo
(org.springframework.data.domain.Page<?> page, String pathTmpl, String queryTmpl, int maxDisplayCount) Constructor.PaginationInfo
(org.springframework.data.domain.Page<?> page, String pathTmpl, String queryTmpl, String criteriaQuery, boolean disableHtmlEscapeOfCriteriaQuery, int maxDisplayCount) Constructor. -
メソッドの概要
修飾子とタイプメソッド説明createAttributeMap
(int pageIndex, int size, org.springframework.data.domain.Sort sort) Creates and returns a map of attributes to be used by pagination functionality in displaying the resultsReturns the class that sets start and end page of paginationFetches the query of search criteriaint
Fetches the current page numberReturns first PaginationURLReturns last PaginationURLint
Returns max count of page displayReturns PaginationURL of next pageprotected org.springframework.web.util.UriComponents
Returns URI of PaginationgetPageUrl
(int pageIndex) Returns paginationURL after setting specified page number and display count to itFetches the path template of paginationReturns PaginationURL of previous pageFetches the query template of paginationboolean
isCurrent
(int page) Determines if the page number passed as argument is the currently displayed page number or notboolean
checks whether the current page is first page.boolean
Determines whether the current page is the last page or not
-
フィールド詳細
-
DEFAULT_MAX_DISPLAY_COUNT
public static final int DEFAULT_MAX_DISPLAY_COUNTIndicates the default value for maximum display count- 関連項目:
-
DEFAULT_PATH_TEMPLATE
Default path template of pagination- 関連項目:
-
DEFAULT_QUERY_TEMPLATE
Default query template of pagination- 関連項目:
-
PAGE_ATTR
page key- 関連項目:
-
SIZE_ATTR
Key name of size- 関連項目:
-
SORT_ORDER_PROPERTY_ATTR
Property key- 関連項目:
-
SORT_ORDER_DIRECTION_ATTR
Property key- 関連項目:
-
A_ELM
Anchor Element- 関連項目:
-
HREF_ATTR
href attribute- 関連項目:
-
CLASS_ATTR
class attribute- 関連項目:
-
DEFAULT_OUTER_ELM
Outer tag of HTML that make up pagination- 関連項目:
-
DEFAULT_OUTER_CLASS
Value of "class" attribute of outer tag of pagination- 関連項目:
-
DEFAULT_INNER_ELM
Inner tag of HTML that make up pagination- 関連項目:
-
DEFAULT_INNER_CLASS
Value of "class" attribute of inner tag of pagination- 導入されたバージョン:
- 5.6.0
- 関連項目:
-
DEFAULT_A_CLASS
Value of "class" attribute of anchor tag of pagination- 導入されたバージョン:
- 5.7.0
- 関連項目:
-
DEFAULT_FIRST_LINK_TEXT
Display text of the link of back to the top- 関連項目:
-
DEFAULT_PREVIOUS_LINK_TEXT
Display text of the link of back to previous- 関連項目:
-
DEFAULT_NEXT_LINK_TEXT
Display text of the link to proceed to the next- 関連項目:
-
DEFAULT_LAST_LINK_TEXT
Display text of the link to forward to the last page- 関連項目:
-
DEFAULT_DISABLED_HREF
Anchor link which is set when the link is disabled.- 関連項目:
-
DEFAULT_ACTIVE_CLASS
Class name that enables the link- 関連項目:
-
DEFAULT_DISABLED_CLASS
Class name that enables the link- 関連項目:
-
-
コンストラクタの詳細
-
PaginationInfo
public PaginationInfo(org.springframework.data.domain.Page<?> page, String pathTmpl, String queryTmpl, int maxDisplayCount) Constructor. Initializes the properties with the arguments passed- パラメータ:
page
- a Page instancepathTmpl
- path template of paginationqueryTmpl
- query template of paginationmaxDisplayCount
- max display count
-
PaginationInfo
public PaginationInfo(org.springframework.data.domain.Page<?> page, String pathTmpl, String queryTmpl, String criteriaQuery, boolean disableHtmlEscapeOfCriteriaQuery, int maxDisplayCount) Constructor. Initializes the properties with the arguments passed- パラメータ:
page
- a Page instancepathTmpl
- path template of paginationqueryTmpl
- query template of paginationcriteriaQuery
- Query of search criteriadisableHtmlEscapeOfCriteriaQuery
- Flag to indicate whether html escaping of criteriaQuery is to be disabled or not.IF set to true, html escaping of criteriaQuery is disabled.maxDisplayCount
- max display count- 導入されたバージョン:
- 1.0.1
-
-
メソッドの詳細
-
createAttributeMap
public static Map<String,Object> createAttributeMap(int pageIndex, int size, org.springframework.data.domain.Sort sort) Creates and returns a map of attributes to be used by pagination functionality in displaying the results
Pagination functionality supports only a single sort order. If a
Sort
instance containing multipleOrder
elements is passed as argument, the lastOrder
element will be applicable- パラメータ:
pageIndex
- index of page number (page index is start with 0).size
- size of page.sort
- Sort option for queries.- 戻り値:
- Map<String, Object> instance of attributes
-
getCurrent
public int getCurrent()Fetches the current page number- 戻り値:
- current page number
-
getPathTmpl
Fetches the path template of pagination- 戻り値:
- String path template of pagination
-
getQueryTmpl
Fetches the query template of pagination- 戻り値:
- String query template of pagination
-
getCriteriaQuery
Fetches the query of search criteria- 戻り値:
- String query of search criteria
- 導入されたバージョン:
- 1.0.1
-
getMaxDisplayCount
public int getMaxDisplayCount()Returns max count of page display- 戻り値:
- String max count of page display
-
getPageUri
protected org.springframework.web.util.UriComponents getPageUri()Returns URI of Pagination- 戻り値:
- String Pagination URI
-
getPageUrl
Returns paginationURL after setting specified page number and display count to it- パラメータ:
pageIndex
- index of page number (page index is start with 0).- 戻り値:
- String Pagination URL with URL page number and display count set to it
-
getFirstUrl
Returns first PaginationURL- 戻り値:
- String first PaginationURL
-
getLastUrl
Returns last PaginationURL- 戻り値:
- String last PaginationURL
-
getPreviousUrl
Returns PaginationURL of previous page- 戻り値:
- String PaginationURL of previous page
-
getNextUrl
Returns PaginationURL of next page- 戻り値:
- String PaginationURL of next page
-
isFirstPage
public boolean isFirstPage()checks whether the current page is first page.- 戻り値:
- True, if the current page is the first page. False otherwise.
-
isLastPage
public boolean isLastPage()Determines whether the current page is the last page or not- 戻り値:
- True, if the current page is the last page. False otherwise.
-
isCurrent
public boolean isCurrent(int page) Determines if the page number passed as argument is the currently displayed page number or not- パラメータ:
page
- page-number- 戻り値:
- True, if the page number passed as argument is the currently displayed page number. False otherwise.
-
getBeginAndEnd
Returns the class that sets start and end page of pagination- 戻り値:
- BeginAndEnd class that sets start and end page of pagination
-