|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.faces.webapp.UIComponentTagBase
javax.faces.webapp.UIComponentClassicTagBase
javax.faces.webapp.UIComponentTag
org.hdpagination.web.jsf.tag.AbstractBaseTag
org.hdpagination.web.jsf.tag.PaginateLinkTag
public class PaginateLinkTag
This JSF Tag is to render pagination navigation links (e.g. Previous Next 1 2 3 4 5 6 7 8 First Last).
The layout of the links is configurable via injecting different implementation instance of
PageLinksPattern interface
into GlobalConfig.
There are some pattern implementation classes available to choose in package org.hdpagination.config.pattern
| Field Summary |
|---|
| Fields inherited from class javax.faces.webapp.UIComponentClassicTagBase |
|---|
bodyContent, pageContext, UNIQUE_ID_PREFIX |
| Fields inherited from class javax.faces.webapp.UIComponentTagBase |
|---|
log |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
| Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
|---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
| Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
|---|
EVAL_BODY_AGAIN |
| Constructor Summary | |
|---|---|
PaginateLinkTag()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getComponentType()
|
java.lang.String |
getRendererType()
|
void |
setFirstResultVar(java.lang.String firstResultVar)
Name of variable in request scope containing index (starting from 1) of the first record in the current page. |
void |
setIsPaginatedVar(java.lang.String isPaginatedVar)
Name of variable in request scope containing flag (Boolean) indicating if pagination is required. |
void |
setLastResultVar(java.lang.String lastResultVar)
Name of variable in request scope containing index (starting from 1) of the last record in the current page. |
void |
setPageIndexVar(java.lang.String pageIndexVar)
Name of variable in request scope containing index (starting from 1) of current page. |
void |
setPagesVar(java.lang.String pagesVar)
Name of variable in request scope containing number of pages. |
void |
setProperties(javax.faces.component.UIComponent component)
|
void |
setRecordsVar(java.lang.String recordsVar)
Name of variable in request scope containing number of total records. |
| Methods inherited from class org.hdpagination.web.jsf.tag.AbstractBaseTag |
|---|
setAccesskey, setPagiDefinitionId, setStyle, setStyleClass, setTabindex, setTitle |
| Methods inherited from class javax.faces.webapp.UIComponentTag |
|---|
createComponent, getParentUIComponentTag, hasBinding, isSuppressed, isValueReference, release, setBinding, setRendered |
| Methods inherited from class javax.faces.webapp.UIComponentClassicTagBase |
|---|
addChild, addFacet, addVerbatimAfterComponent, addVerbatimBeforeComponent, createVerbatimComponent, createVerbatimComponentFromBodyContent, doAfterBody, doEndTag, doInitBody, doStartTag, encodeBegin, encodeChildren, encodeEnd, findComponent, getBodyContent, getComponentInstance, getCreated, getCreatedComponents, getDoAfterBodyValue, getDoEndValue, getDoStartValue, getFacesContext, getFacesJspId, getFacetName, getId, getIndexOfNextChildTag, getJspId, getParent, getParentUIComponentClassicTagBase, getPreviousOut, setBodyContent, setId, setJspId, setPageContext, setParent, setupResponseWriter |
| Methods inherited from class javax.faces.webapp.UIComponentTagBase |
|---|
getELContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
doEndTag, doStartTag, getParent, setPageContext, setParent |
| Constructor Detail |
|---|
public PaginateLinkTag()
| Method Detail |
|---|
public java.lang.String getRendererType()
getRendererType in class javax.faces.webapp.UIComponentTagBasepublic java.lang.String getComponentType()
getComponentType in class javax.faces.webapp.UIComponentTagBasepublic void setPageIndexVar(java.lang.String pageIndexVar)
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}" />
pageIndexVar - public void setPagesVar(java.lang.String pagesVar)
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}" />
pagesVar - public void setRecordsVar(java.lang.String recordsVar)
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}" />
recordsVar - public void setFirstResultVar(java.lang.String firstResultVar)
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
firstResultVar - public void setLastResultVar(java.lang.String lastResultVar)
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).
lastResultVar - public void setIsPaginatedVar(java.lang.String isPaginatedVar)
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>
isPaginatedVar - public void setProperties(javax.faces.component.UIComponent component)
setProperties in class AbstractBaseTag
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||