|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
com.infragistics.faces.shared.component.DataRepeater
com.infragistics.faces.shared.component.DataList
This class provides built-in Paging and Sorting capabilities.
Paging
Paging is the ability to navigate to the first/previous/next/last page or more generally to a specific page index.
Paging allows to process large amount of data and still provide very fast response time.
Automatic Paging (Default mode)
In this mode, the component automatically handles Paging. To enable automatic paging, simply set the pageSize property by calling the method setPageSize(int).
Custom Paging
This mode gives the possibility to fully control how pages of data are fetched from the DataModel.
setCustomPagingEnabled(boolean)
addPageChangeListener(PageChangeListener)
DataRepeater.setDataSource(DataModel).
DataRepeater.dataBind()
setSortExpressions(SortExpression[]).setCustomSortingEnabled(boolean)
addSortListener(SortListener)
DataRepeater.setDataSource(DataModel).
DataRepeater.dataBind()
| Field Summary | |
static java.lang.String |
COMPONENT_FAMILY
|
static java.lang.String |
COMPONENT_TYPE
|
static java.lang.String |
RENDERER_TYPE
|
| Fields inherited from class com.infragistics.faces.shared.component.DataRepeater |
DATA_ROW |
| Fields inherited from interface javax.faces.component.NamingContainer |
SEPARATOR_CHAR |
| Constructor Summary | |
DataList()
|
|
| Method Summary | |
void |
addPageChangeListener(PageChangeListener listener)
Register a new PageChangeListener which will be notified of PageChangeEvent |
void |
addSortListener(SortListener listener)
Register a new SortListener which will be notified of SortEvent |
void |
broadcast(javax.faces.event.FacesEvent event)
|
void |
firePageChangeEvent(int pageIndex)
Fire a PageChangeEvent |
void |
fireSortEvent(SortExpression[] sortExpressions)
Fire a SortEvent |
java.lang.String |
getFamily()
|
int |
getItemCount()
Returns the total number of items to display, as follow: If the value has been explicitly set (via a call to setItemCount) , returns it If the component is bound to the DataSource, returns the number of rows in the underlying DataModel otherwise returns the number of child components |
javax.faces.el.MethodBinding |
getPageChangeListener()
Returns the MethodBinding pointing at a pageChange listener method to be invoked whenever the user navigates to a different page |
PageChangeListener[] |
getPageChangeListeners()
Returns the set of registered PageChangeListener for this component |
int |
getPageCount()
Convenient method returning the total number of pages to display. |
int |
getPageIndex()
Returns the zero-based index of the page to display |
int |
getPageSize()
Returns how many rows are displayed on each page or 0 if all rows should be processed. |
int |
getSortExpressionIndex(java.lang.String sortBy)
Returns the index of the SortExpression that matches the specified sortBy |
SortExpression[] |
getSortExpressions()
Returns the array of sortExpression that are used to sort items |
javax.faces.el.MethodBinding |
getSortListener()
Returns the MethodBinding pointing at a sort listener method to be invoked whenever the sort order of the DataList has changed |
SortListener[] |
getSortListeners()
Returns the set of registered SortListener for this component |
boolean |
isCustomPagingEnabled()
Returns a boolean indicating whether custom paging is enabled or not |
boolean |
isCustomSortingEnabled()
Returns a boolean indicating whether custom sorting is enabled or not |
void |
removePageChangeListener(PageChangeListener listener)
Remove an existing PageChangeListener (if any) from the set of listeners interested in being notified in PageChangeEvent. |
void |
removeSortListener(SortListener listener)
Remove an existing SortListener (if any) from the set of listeners interested in being notified in SortEvent. |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setCustomPagingEnabled(boolean customPaging)
Sets a boolean indicating whether custom paging is enabled or not |
void |
setCustomSortingEnabled(boolean customSortingEnabled)
Sets a boolean indicating whether custom sorting is enabled or not |
void |
setItemCount(int itemCount)
Sets the total number of items to display. |
void |
setPageChangeListener(javax.faces.el.MethodBinding pageChangeListener)
Sets the MethodBinding pointing at a pageChange listener method to be invoked whenever the user navigates to a different page |
void |
setPageIndex(int index)
Sets the zero-based index of the page to display |
void |
setPageSize(int size)
Set the number of rows to display on each page or 0 for all rows |
void |
setSortExpressions(SortExpression[] sortExpressions)
Sets the array of sortExpression that are used to sort items |
void |
setSortListener(javax.faces.el.MethodBinding sortListener)
Sets the MethodBinding pointing at a sort listener method to be invoked whenever the sort order of the DataList has changed |
| Methods inherited from class com.infragistics.faces.shared.component.DataRepeater |
dataBind, encodeBegin, encodeEnd, getDataKeyName, getDataKeyValue, getDataSource, getTemplateItems, processUpdates, processValidators, queueEvent, setDataKeyName, setDataSource, setValueBinding |
| Methods inherited from class javax.faces.component.UIComponentBase |
decode, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static java.lang.String COMPONENT_FAMILY
public static java.lang.String COMPONENT_TYPE
public static java.lang.String RENDERER_TYPE
| Constructor Detail |
public DataList()
| Method Detail |
public java.lang.String getFamily()
getFamily in class DataRepeaterpublic void addPageChangeListener(PageChangeListener listener)
public void addSortListener(SortListener listener)
public void broadcast(javax.faces.event.FacesEvent event)
throws javax.faces.event.AbortProcessingException
broadcast in class DataRepeaterjavax.faces.event.AbortProcessingExceptionpublic void firePageChangeEvent(int pageIndex)
pageIndex - - the new page index to displaypublic void fireSortEvent(SortExpression[] sortExpressions)
sortExpressions - - an array of SortExpressionpublic int getItemCount()
public javax.faces.el.MethodBinding getPageChangeListener()
public PageChangeListener[] getPageChangeListeners()
public int getPageCount()
public int getPageIndex()
public int getPageSize()
public int getSortExpressionIndex(java.lang.String sortBy)
sortBy -
public SortExpression[] getSortExpressions()
public javax.faces.el.MethodBinding getSortListener()
public SortListener[] getSortListeners()
public boolean isCustomPagingEnabled()
public boolean isCustomSortingEnabled()
public void removePageChangeListener(PageChangeListener listener)
public void removeSortListener(SortListener listener)
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class DataRepeaterpublic java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class DataRepeaterpublic void setCustomPagingEnabled(boolean customPaging)
public void setCustomSortingEnabled(boolean customSortingEnabled)
public void setItemCount(int itemCount)
itemCount - public void setPageChangeListener(javax.faces.el.MethodBinding pageChangeListener)
pageChangeListener - public void setPageIndex(int index)
index - public void setPageSize(int size)
size - public void setSortExpressions(SortExpression[] sortExpressions)
sortExpressions - public void setSortListener(javax.faces.el.MethodBinding sortListener)
sortListener -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||