|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.empire.jsf2.pages.PageElement
org.apache.empire.jsf2.pageelements.ListPageElement<T>
org.apache.empire.jsf2.pageelements.BeanListPageElement<T>
public class BeanListPageElement<T>
Nested Class Summary | |
---|---|
static class |
BeanListPageElement.BeanListTableInfo
Extended ListTableInfo |
Nested classes/interfaces inherited from class org.apache.empire.jsf2.pageelements.ListPageElement |
---|
ListPageElement.ListTableInfo, ListPageElement.SelectableItem, ListPageElement.SelectionSet |
Field Summary | |
---|---|
protected boolean |
defaultSortAscending
|
protected Column |
defaultSortColumn
|
static String |
IDPARAM_PROPERTY
|
protected int |
maxItemCount
|
static String |
NO_RESULT_ATTRIBUTE
|
protected DBRowSet |
rowset
|
protected DBOrderByExpr |
secondarySortOrder
|
Fields inherited from class org.apache.empire.jsf2.pageelements.ListPageElement |
---|
beanClass, items, selectedItems |
Constructor Summary | |
---|---|
BeanListPageElement(Page page,
Class<T> beanClass,
DBColumn defaultSortColumn,
String propertyName)
|
Method Summary | |
---|---|
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 |
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 |
Methods inherited from class org.apache.empire.jsf2.pageelements.ListPageElement |
---|
assignSelectionMap, clearSelection, getItems, getSelectedItemCount, getSelectedItems, isBlank, isEmpty, isHasSelection, isInvertSelection, isNotEmpty, isSingleSelection, isValid, setInvertSelection, setSelection, setSelection, setSingleSelection |
Methods inherited from class org.apache.empire.jsf2.pages.PageElement |
---|
getConnection, getConnection, getPage, getPropertyName, getSessionObject, removeSessionObject, setSessionObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String IDPARAM_PROPERTY
public static final String NO_RESULT_ATTRIBUTE
protected DBRowSet rowset
protected Column defaultSortColumn
protected boolean defaultSortAscending
protected DBOrderByExpr secondarySortOrder
protected int maxItemCount
Constructor Detail |
---|
public BeanListPageElement(Page page, Class<T> beanClass, DBColumn defaultSortColumn, String propertyName)
Method Detail |
---|
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
- 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 Set<Object[]> getSelectedItemKeys()
public void setSelectedItems(Set<Object[]> items)
protected void generateIdParams(DBRowSet rowset, List<?> items)
protected Object[] getItemKey(DBColumn[] cols, Object item)
public DBCommand getItemQueryCmd()
getItemQueryCmd
in interface ListItemSelection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |