org.hdpagination.config.pattern
Class OnlyNavigatePageLinksPattern
java.lang.Object
org.hdpagination.config.pattern.BasePageLinksPattern
org.hdpagination.config.pattern.OnlyNavigatePageLinksPattern
- All Implemented Interfaces:
- PageLinksPattern
public class OnlyNavigatePageLinksPattern
- extends BasePageLinksPattern
- implements PageLinksPattern
Display 'Pagination Control' links as the following pattern or style:
First PrevNext Last
The rules of display can be described as follows:
When on first page of results do not display the 'Previous' and 'First' page links
When on the last page of results do not display the 'Next' and 'Last' page links
- Since:
- 1.0
- Author:
- Liangfeng Ren
|
Method Summary |
Output[] |
output(Page page,
java.lang.Object request)
Tell PaginationLinkTag which kinds of "Pagination Control" links should be
displayed in page. |
void |
setDisplayFirstPageLink(boolean displayFirstPageLink)
If the 'first' page navigation link should be displayed when current page is not
the first page. |
void |
setDisplayLastPageLink(boolean displayLastPageLink)
If the 'last' page navigation link should be displayed when current page is not
the last page. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OnlyNavigatePageLinksPattern
public OnlyNavigatePageLinksPattern()
setDisplayFirstPageLink
public void setDisplayFirstPageLink(boolean displayFirstPageLink)
- If the 'first' page navigation link should be displayed when current page is not
the first page. If this flag is set to false, the 'first' page link is never
displayed in page even when on the first page.
- Parameters:
displayFirstPageLink -
setDisplayLastPageLink
public void setDisplayLastPageLink(boolean displayLastPageLink)
- If the 'last' page navigation link should be displayed when current page is not
the last page. If this flag is set to false, the 'last' page link is never
displayed in page even when on the last page.
- Parameters:
displayLastPageLink -
output
public Output[] output(Page page,
java.lang.Object request)
- Description copied from interface:
PageLinksPattern
- Tell
PaginationLinkTag which kinds of "Pagination Control" links should be
displayed in page.
In order to support Portlet environment, the type of the second argument (request) has been changed from
HttpServletRequest to Object since version 1.2
- Specified by:
output in interface PageLinksPattern
request - the request is an instance of HttpServletRequest if running in Servlet environment,
or an instance of PortletRequest if running in Portlet environment.
- Returns:
- Array of "Pagination Control" links or normal labels that will be displayed in page
Copyright © 2008 HDPagination All Rights Reserved.