public abstract class ListPageElement<T> extends PageElement
Modifier and Type | Class and Description |
---|---|
static class |
ListPageElement.ListTableInfo
This class holds information about the list view to display.
|
static interface |
ListPageElement.ParameterizedItem
Interface to uniquely identify a list item
This will be used for selection and navigation
|
static class |
ListPageElement.SelectableItem
Abstract superclass to make a list item selectable
|
static class |
ListPageElement.SelectionSet
SelectionSet
Contains the key of all items implementing "SelectableItem"
|
Modifier and Type | Field and Description |
---|---|
protected Class<T> |
beanClass |
protected List<T> |
items |
protected ListPageElement.SelectionSet |
selectedItemKeys |
Constructor and Description |
---|
ListPageElement(Page page,
Class<T> beanClass,
String propertyName) |
Modifier and Type | Method and Description |
---|---|
void |
clearItems() |
void |
clearSelection()
Selection
|
int |
getItemCount()
returns the total item count of the entire list (not just the visible part)
|
List<T> |
getItems() |
int |
getSelectedItemCount() |
Set<Object[]> |
getSelectedItemKeys() |
List<T> |
getSelectedItems() |
abstract ListPageElement.ListTableInfo |
getTableInfo()
session scoped properties
|
boolean |
isBlank()
added as "isEmpty" is not accessible from EL.
|
boolean |
isEmpty()
returns true if the either the item list is not valid or if it contains no items
|
boolean |
isHasSelection() |
boolean |
isInvertSelection() |
boolean |
isNotEmpty()
returns whether the item list is valid and contains at least one item
|
boolean |
isSingleSelection() |
boolean |
isValid()
returns whether the item list has been loaded
|
void |
setInvertSelection(boolean invertSelection) |
void |
setSelectedItems(Set<Object[]> items) |
void |
setSelection(ListPageElement.SelectableItem item) |
void |
setSelection(ListPageElement.SelectableItem[] items) |
void |
setSingleSelection(boolean singleSelection) |
getDefaultPropertyName, getPage, getPropertyName, getSessionObject, onInitPage, onRefreshPage, removeSessionObject, setSessionObject
protected ListPageElement.SelectionSet selectedItemKeys
public abstract ListPageElement.ListTableInfo getTableInfo()
public final boolean isValid()
public final boolean isEmpty()
public final boolean isNotEmpty()
public final boolean isBlank()
public int getItemCount()
public void clearItems()
public void clearSelection()
public boolean isHasSelection()
public int getSelectedItemCount()
public boolean isInvertSelection()
public void setInvertSelection(boolean invertSelection)
public boolean isSingleSelection()
public void setSingleSelection(boolean singleSelection)
public void setSelection(ListPageElement.SelectableItem item)
public void setSelection(ListPageElement.SelectableItem[] items)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.