hdp
Tag paginateLink


This JSF Tag is used to render pagination navigation links (e.g. Previous Next 1 2 3 4 5 6 7 8 First Last). Layout of the links is configurable via injecting different implementation instance of org.hdpagination.config.PageLinksPattern interface into org.hdpagination.config.GlobalConfig. There are some pattern implementation classes available to choose in package 'org.hdpagination.config.pattern'.

Unless otherwise specified, all attributes accept static values or EL expressions.



Tag Information
Tag Classorg.hdpagination.web.jsf.tag.PaginateLinkTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
pagiDefinitionIdtruetruejava.lang.StringBean identifier of the corresponding PaginateDefinition instance declared in Spring application context.
styleClassfalsefalsejava.lang.StringSpace-separated list of CSS style class(es) to be applied to the rendered hyperlinks (<a>). Refer to attribute 'class' in <a> HTML tag.
stylefalsefalsejava.lang.StringSpecifies an inline style for the rendered hyperlinks (<a>). Refer to attribute 'style' in <a> HTML tag.
isPaginatedVarfalsefalsejava.lang.StringName of variable in request scope containing flag (Boolean) indicating if pagination is required. You can use this variable to determine whether other pagination related information should be rendered or not.

For example, if this property value is specified as "_isPaginated" then you can use the following snippet to display the pagination information:

     <h:panelGroup rendered="#{_isPaginated}">

       <h:outputText value="Page "/>

       <h:outputText value="#{_pageIndex}" />

       <h:outputText value=" of "/>

       <h:outputText value="#{_pages}" />

       ....

     </h:panelGroup>

This value must be a static value.

pageIndexVarfalsefalsejava.lang.StringName of variable in request scope containing index (starting from 1) of current page. You can use this variable to print out the current page number.

For example, if this property value is specified as "_pageIndex" then you can use the following snippet to display the current page number:

<h:outputText value="#{_pageIndex}" />

This value must be a static value.

pagesVarfalsefalsejava.lang.StringName of variable in request scope containing number of pages. You can use this variable to print out the count of pages for the current search result.

For example, if this property value is specified as "_pages" then you can use the following snippet to display the count of pages:

<h:outputText value="#{_pages}" />

This value must be a static value.

recordsVarfalsefalsejava.lang.StringName of variable in request scope containing number of total records. You can use this variable to print out the count of total records for the current search result.

For example, if this property value is specified as "_records" then you can use the following snippet to display the count of total records:

<h:outputText value="#{_records}" />

This value must be a static value.

firstResultVarfalsefalsejava.lang.StringName of variable in request scope containing index (starting from 1) of the first record in the current page.

Taking an example with following assumptions:

  1) the page size is defined to 10

  2) currently in the 3rd page

  3) this property value is specified as "_firstResult"

The following snippet

      <h:outputText value="#{_firstResult}" />

will display 20

This value must be a static value.

lastResultVarfalsefalsejava.lang.StringName of variable in request scope containing index (starting from 1) of the last record in the current page.

Taking an example with following assumptions:

  1) the page size is defined to 10

  2) currently in the 3rd page

  3) this property value is specified as "_lastResult"

The following snippet

      <h:outputText value="#{_lastResult}" />

will display

   (a) 30 -- if current page is not the last page

   (b) index of the last record -- if current page is not the last page (e.g, it will display 25 if there are 25 records totally in the search results).

This value must be a static value.


Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.