public class BeanListPageElement<T> extends ListPageElement<T> implements ListItemSelection
Modifier and Type | Class and Description |
---|---|
static class |
BeanListPageElement.BeanListTableInfo
Extended ListTableInfo
|
ListPageElement.ListTableInfo, ListPageElement.ParameterizedItem, ListPageElement.SelectableItem, ListPageElement.SelectionSet
Modifier and Type | Field and Description |
---|---|
protected boolean |
defaultSortAscending |
protected Column |
defaultSortColumn |
protected int |
maxItemCount |
static String |
NO_RESULT_ATTRIBUTE |
protected DBRowSet |
rowset |
protected DBOrderByExpr |
secondarySortOrder |
beanClass, items, selectedItems
Constructor and Description |
---|
BeanListPageElement(Page page,
Class<T> beanClass,
DBColumn defaultSortColumn)
Overload that requires a default sort order to be provided
|
BeanListPageElement(Page page,
Class<T> beanClass,
DBColumn defaultSortColumn,
String propertyName)
Overload that requires a default sort order to be provided
|
BeanListPageElement(Page page,
Class<T> beanClass,
DBRowSet rowSet)
Overload that requires a default sort order to be provided
|
BeanListPageElement(Page page,
Class<T> beanClass,
DBRowSet rowset,
DBColumn defaultSortColumn,
String propertyName)
Constructor for creating a BeanListPageElement
|
Modifier and Type | Method and Description |
---|---|
void |
clearItems() |
protected void |
generateIdParams(DBRowSet rowset,
List<?> items) |
Column |
getDefaultSortColumn() |
int |
getItemCount()
returns the total item count of the entire list (not just the visible part)
|
protected Object[] |
getItemKey(DBColumn[] cols,
Object item) |
DBCommand |
getItemQueryCmd() |
protected ParameterMap |
getParameterMap() |
int |
getScrollbarPosition() |
DBOrderByExpr |
getSecondarySortOrder() |
Set<Object[]> |
getSelectedItemKeys() |
ListPageElement.ListTableInfo |
getTableInfo()
session scoped properties
|
protected void |
handleNoResult()
handle the case of an empty query result
|
void |
initItems(DBCommand queryCmd)
Init list items without pagination
|
void |
initItems(DBCommand queryCmd,
DBCommand countCmd,
int pageSize)
Init list items with pagination
|
void |
initItems(DBCommand queryCmd,
int pageSize)
Init list items without pagination
|
void |
initScrollbar()
addJavascriptCall to initScrollbar
|
boolean |
isDefaultSortAscending() |
boolean |
isResultEmpty()
Returns true if (and only if) items are valid but empty
|
protected void |
loadItems(boolean initScrollbar)
loads all visible list items from the database
|
protected void |
onInitPage() |
protected void |
onRefreshPage() |
void |
positionValueChanged(javax.faces.event.ValueChangeEvent ve) |
void |
setDefaultSortAscending(boolean defaultSortAscending) |
protected void |
setOrderBy(DBCommand cmd)
set order by for db queries
|
protected void |
setOrderBy(DBCommand cmd,
DBColumnExpr sortColumn,
boolean sortAscending) |
void |
setScrollbarPosition(int value) |
void |
setSecondarySortOrder(DBOrderByExpr secondarySortOrder) |
void |
setSelectedItems(Set<Object[]> items) |
void |
updateScrollbar()
addJavascriptCall to updateScrollbar
|
assignSelectionMap, clearSelection, getItems, getSelectedItemCount, getSelectedItems, isBlank, isEmpty, isHasSelection, isInvertSelection, isNotEmpty, isSingleSelection, isValid, setInvertSelection, setSelection, setSelection, setSingleSelection
getConnection, getConnection, getDefaultPropertyName, getPage, getPropertyName, getSessionObject, removeSessionObject, setSessionObject
public static final String NO_RESULT_ATTRIBUTE
protected DBRowSet rowset
protected Column defaultSortColumn
protected boolean defaultSortAscending
protected DBOrderByExpr secondarySortOrder
protected int maxItemCount
public BeanListPageElement(Page page, Class<T> beanClass, DBRowSet rowset, DBColumn defaultSortColumn, String propertyName)
page
- the page elementbeanClass
- the bean classrowset
- required Table or ViewdefaultSortColumn
- sort column that must belong to rowsetpropertyName
- the property name which is used to get and retrieve session informationpublic BeanListPageElement(Page page, Class<T> beanClass, DBColumn defaultSortColumn, String propertyName)
page
- the page elementbeanClass
- the bean classdefaultSortColumn
- propertyName
- the property name which is used to get and retrieve session informationpublic BeanListPageElement(Page page, Class<T> beanClass, DBColumn defaultSortColumn)
page
- the page elementbeanClass
- the bean classdefaultSortColumn
- protected void onInitPage()
onInitPage
in class PageElement
protected void onRefreshPage()
onRefreshPage
in class PageElement
public int getItemCount()
ListPageElement
getItemCount
in class ListPageElement<T>
public Column getDefaultSortColumn()
public boolean isDefaultSortAscending()
public void setDefaultSortAscending(boolean defaultSortAscending)
public DBOrderByExpr getSecondarySortOrder()
public void setSecondarySortOrder(DBOrderByExpr secondarySortOrder)
public ListPageElement.ListTableInfo getTableInfo()
getTableInfo
in class ListPageElement<T>
public void clearItems()
clearItems
in class ListPageElement<T>
protected ParameterMap getParameterMap()
public void initItems(DBCommand queryCmd, DBCommand countCmd, int pageSize)
queryCmd
- pageSize
- protected void handleNoResult()
public final void initItems(DBCommand queryCmd, int pageSize)
queryCmd
- public final void initItems(DBCommand queryCmd)
queryCmd
- public boolean isResultEmpty()
protected void loadItems(boolean initScrollbar)
initScrollbar
- protected void setOrderBy(DBCommand cmd)
cmd
- protected void setOrderBy(DBCommand cmd, DBColumnExpr sortColumn, boolean sortAscending)
public void initScrollbar()
public void updateScrollbar()
public int getScrollbarPosition()
public void setScrollbarPosition(int value)
public void positionValueChanged(javax.faces.event.ValueChangeEvent ve)
public DBCommand getItemQueryCmd()
getItemQueryCmd
in interface ListItemSelection
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.