org.apache.empire.jsf2.pageelements
Class ListPageElement<T>

java.lang.Object
  extended by org.apache.empire.jsf2.pages.PageElement
      extended by org.apache.empire.jsf2.pageelements.ListPageElement<T>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BeanListPageElement, StaticListPageElement

public abstract class ListPageElement<T>
extends PageElement

See Also:
Serialized Form

Nested Class Summary
static class ListPageElement.ListTableInfo
           
static class ListPageElement.SelectableItem
           
static class ListPageElement.SelectionSet
           
 
Field Summary
protected  Class<T> beanClass
           
protected  List<T> items
           
protected  ListPageElement.SelectionSet selectedItems
           
 
Constructor Summary
ListPageElement(Page page, Class<T> beanClass, String propertyName)
           
 
Method Summary
protected  void assignSelectionMap(List<?> items)
           
 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()
           
 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 setSelection(ListPageElement.SelectableItem item)
           
 void setSelection(ListPageElement.SelectableItem[] items)
           
 void setSingleSelection(boolean singleSelection)
           
 
Methods inherited from class org.apache.empire.jsf2.pages.PageElement
getConnection, getConnection, getPage, getPropertyName, getSessionObject, onInitPage, onRefreshPage, removeSessionObject, setSessionObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beanClass

protected Class<T> beanClass

items

protected List<T> items

selectedItems

protected ListPageElement.SelectionSet selectedItems
Constructor Detail

ListPageElement

public ListPageElement(Page page,
                       Class<T> beanClass,
                       String propertyName)
Method Detail

getTableInfo

public abstract ListPageElement.ListTableInfo getTableInfo()
session scoped properties


getItems

public List<T> getItems()

isValid

public final boolean isValid()
returns whether the item list has been loaded

Returns:
true if the item list has been loaded even it contains no items for false otherwise

isEmpty

public final boolean isEmpty()
returns true if the either the item list is not valid or if it contains no items

Returns:
true if the either the item list is not valid or if it contains no items

isNotEmpty

public final boolean isNotEmpty()
returns whether the item list is valid and contains at least one item

Returns:
true if the item list contains one or more items or false otherwise

isBlank

public final boolean isBlank()
added as "isEmpty" is not accessible from EL.

Returns:
true if the either the item list is not valid or if it contains no items

getItemCount

public int getItemCount()
returns the total item count of the entire list (not just the visible part)

Returns:
the total number of items in the list

clearItems

public void clearItems()

clearSelection

public void clearSelection()
Selection


isHasSelection

public boolean isHasSelection()

getSelectedItemCount

public int getSelectedItemCount()

getSelectedItems

public List<T> getSelectedItems()

isInvertSelection

public boolean isInvertSelection()

setInvertSelection

public void setInvertSelection(boolean invertSelection)

isSingleSelection

public boolean isSingleSelection()

setSingleSelection

public void setSingleSelection(boolean singleSelection)

setSelection

public void setSelection(ListPageElement.SelectableItem item)

setSelection

public void setSelection(ListPageElement.SelectableItem[] items)

assignSelectionMap

protected void assignSelectionMap(List<?> items)


Copyright © 2008–2014 Apache Software Foundation. All rights reserved.