public class PagerButtonTag
extends javax.faces.webapp.UIComponentTag
Description:
This class is the tag handler for a next/previous control for a paging a dataTable.
This displays a set of labels but does not control the dataTable directly.
It posts the form indicated by form id.
Usage: Designed to get its parameters via value references in a backing bean from the back end, using Hibernate partial result sets. required: formId this is the form id you are in, and it will post to it dataTableId this is a unique value for each data table you control to make the controls unique firstItem the first item number (e.g. 1) lastItem the last item number (e.g. 10) prevText e.g "Previous" from a resource bundle nextText e.g. "Next" from a bundle (these are the only parts that can be localized) numItems number of items to show at one time totalItems total number of items optional: prevDisabled if set to "true" will disable button nextDisabled if set to "true" will disable button Note that if you are on "1" it will automatically disable the previous button, and if you are on totalItems it will automatically disable the next. Disabled buttons are greyed out.
Copyright: Copyright (c) 2004
Organization: Sakai Project
| Constructor and Description |
|---|
PagerButtonTag() |
| Modifier and Type | Method and Description |
|---|---|
String |
getComponentType() |
String |
getDataTableId()
data table id, placed in the name of the controls for uniqueness
technically could be anything, but using the id of the dataTable is
best practice
|
String |
getFirstItem()
number of first item displayed
|
String |
getFormId()
id of form to post to, placed in the name of the prev/next controls
|
String |
getLastItem()
number of last item displayed
|
String |
getNextDisabled()
"true" if next control disabled
|
String |
getNextText()
text for "Next"
|
String |
getNumItems()
number of items string, how many iems in the datatable, selected option
|
String |
getPrevDisabled()
"true" if previous control disabled
|
String |
getPrevText()
text for "Previous"
|
String |
getRendererType() |
String |
getTotalItems()
display total items
|
void |
setDataTableId(String dataTableId)
data table id, placed in the name of the controls for uniqueness
|
void |
setFirstItem(String firstItem)
number of first item displayed
|
void |
setFormId(String formId)
id of form to post to, placed in the name of the controls
|
void |
setLastItem(String lastItem)
number of first item displayed
|
void |
setNextDisabled(String nextDisabled)
"true" if next control disabled
|
void |
setNextText(String nextText)
text for "Next"
|
void |
setNumItems(String numItems)
number of items string, how many iems in the datatable, selected option
|
void |
setPrevDisabled(String prevDisabled)
"true" if previous control to be disabled, otehrwise ignored
|
void |
setPrevText(String prevText)
text for "Previous"
|
protected void |
setProperties(javax.faces.component.UIComponent component) |
void |
setTotalItems(String totalItems)
total items to display as "out of n total items"
|
doEndTag, doStartTag, encodeBegin, encodeChildren, encodeEnd, findComponent, getComponentInstance, getCreated, getDoEndValue, getDoStartValue, getFacesContext, getFacetName, getId, getParent, getParentUIComponentTag, isSuppressed, isValueReference, release, setBinding, setId, setPageContext, setParent, setRendered, setupResponseWriterpublic String getComponentType()
getComponentType in class javax.faces.webapp.UIComponentTagpublic String getRendererType()
getRendererType in class javax.faces.webapp.UIComponentTagprotected void setProperties(javax.faces.component.UIComponent component)
setProperties in class javax.faces.webapp.UIComponentTagpublic String getFormId()
public void setFormId(String formId)
formId - id of form to post topublic String getFirstItem()
public void setFirstItem(String firstItem)
firstItem - number of first item displayedpublic String getLastItem()
public void setLastItem(String lastItem)
lastItem - number of first item displayedpublic String getDataTableId()
public void setDataTableId(String dataTableId)
dataTableId - data table id, placed in the name of the controlspublic String getPrevText()
public void setPrevText(String prevText)
prevText - text for "Previous"public String getNextText()
public void setNextText(String nextText)
nextText - text for "Next"public String getNumItems()
public void setNumItems(String numItems)
numItems - number of items stringpublic String getPrevDisabled()
public void setPrevDisabled(String prevDisabled)
prevDisabled - "true" if previous control disabledpublic String getNextDisabled()
public void setNextDisabled(String nextDisabled)
nextDisabled - "true" if next control disabledpublic String getTotalItems()
public void setTotalItems(String totalItems)
totalItems - total items, typically a numeric stringCopyright © 2005-2014 Sakai Project. All Rights Reserved.