org.apache.myfaces.tobago.internal.component
Class AbstractUISheet

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIData
              extended by org.apache.myfaces.tobago.internal.component.AbstractUISheet
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder, InvokeOnComponent, OnComponentPopulated, SupportsRenderedPartially, Configurable, SheetStateChangeSource, SortActionSource, LayoutBase, LayoutBox, LayoutComponent, LayoutContainer
Direct Known Subclasses:
UISheet

public abstract class AbstractUISheet
extends javax.faces.component.UIData
implements SheetStateChangeSource, SortActionSource, InvokeOnComponent, OnComponentPopulated, LayoutContainer, LayoutComponent, SupportsRenderedPartially


Field Summary
static String ATTR_SCROLL_POSITION
          Deprecated. Please use Attributes instead. Will be removed after Tobago 1.5.0
static String COMPONENT_TYPE
           
static String FACET_SORTER
          Deprecated. Please use Facets instead. Will be removed after Tobago 1.5.0
static String MULTI
           
static String NONE
           
static String SINGLE
           
static String SORTER_ID
           
 
Fields inherited from class javax.faces.component.UIData
COMPONENT_FAMILY
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Fields inherited from interface org.apache.myfaces.tobago.component.OnComponentPopulated
MARKER
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
AbstractUISheet()
           
 
Method Summary
 void addStateChangeListener(SheetStateChangeListener listener)
           
 void broadcast(javax.faces.event.FacesEvent facesEvent)
           
 void encodeBegin(javax.faces.context.FacesContext facesContext)
           
 javax.faces.component.UIComponent findComponent(String searchId)
           
 List<javax.faces.component.UIColumn> getAllColumns()
           
 LayoutTokens getColumnLayout()
           
abstract  String getColumns()
           
 List<LayoutComponent> getComponents()
           
 int getCurrentPage()
           
 int getFirstRowIndexOfLastPage()
          Determines the beginning of the last page in the model.
 int getLast()
          Deprecated. The name of this method is ambiguous. You may use getLastRowIndexOfCurrentPage(). Deprecated since 1.5.5.
 int getLastPageIndex()
          Deprecated. The name of this method is ambiguous. You may use getFirstRowIndexOfLastPage(). Deprecated since 1.5.5.
 int getLastRowIndexOfCurrentPage()
          The rowIndex of the last row on the current page plus one (because of zero based iterating).
 LayoutComponentRenderer getLayoutComponentRenderer(javax.faces.context.FacesContext context)
           
 LayoutManager getLayoutManager()
           
 Boolean getNeedVerticalScrollbar()
           
 int getPage()
          Deprecated. Please use getCurrentPage() which returns the value zero-based. Deprecated since 1.5.5.
 int getPages()
          The number of pages to render.
 List<javax.faces.component.UIComponent> getRenderedChildrenOf(javax.faces.component.UIColumn column)
           
 List<javax.faces.component.UIColumn> getRenderedColumns()
           
 Integer[] getScrollPosition()
           
 SheetState getSheetState(javax.faces.context.FacesContext facesContext)
           
 SheetState getState()
           
 SheetStateChangeListener[] getStateChangeListeners()
           
 List<Integer> getWidthList()
           
 boolean hasRowCount()
           
 boolean hasRows()
          Deprecated. The name of this method is ambiguous. You may use isRowsUnlimited(). Deprecated since 1.5.5.
 boolean invokeOnComponent(javax.faces.context.FacesContext facesContext, String clientId, javax.faces.component.ContextCallback callback)
           
 boolean isAtBeginning()
           
 boolean isAtEnd()
           
 boolean isLayoutChildren()
          Should the children of the this component be laid out from the given layout manager.
 boolean isPagingVisible()
           
 boolean isRowsUnlimited()
           
abstract  boolean isShowHeader()
           
abstract  boolean isShowPagingAlways()
           
 boolean needMoreThanOnePage()
           
 void onComponentPopulated(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent parent)
           
 void performPaging(PageActionEvent pageEvent)
           
 void processUpdates(javax.faces.context.FacesContext context)
           
 void queueEvent(javax.faces.event.FacesEvent facesEvent)
           
 void removeStateChangeListener(SheetStateChangeListener listener)
           
 void resetColumnWidths()
          Remove the (by user) resized column widths.
 void restoreState(javax.faces.context.FacesContext context, Object savedState)
           
 Object saveState(javax.faces.context.FacesContext context)
           
 void setLayoutManager(LayoutManager layoutManager)
           
 void setNeedVerticalScrollbar(Boolean needVerticalScrollbar)
           
 void setState(SheetState state)
           
 void setWidthList(List<Integer> widthList)
           
 String stripRowIndex(String searchId)
           
 
Methods inherited from class javax.faces.component.UIData
encodeEnd, getClientId, getDataModel, getFamily, getFirst, getFooter, getHeader, getRowCount, getRowData, getRowIndex, getRows, getValue, getVar, isRowAvailable, processDecodes, processValidators, setDataModel, setFirst, setFooter, setHeader, setRowIndex, setRows, setValue, setValueExpression, setVar
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, encodeChildren, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.myfaces.tobago.event.SheetStateChangeSource
getStateChangeListener, setStateChangeListener
 
Methods inherited from interface org.apache.myfaces.tobago.event.SortActionSource
getSortActionListener, setSortActionListener
 
Methods inherited from interface org.apache.myfaces.tobago.layout.LayoutContainer
isOverflowX, isOverflowY, setOverflowX, setOverflowY
 
Methods inherited from interface org.apache.myfaces.tobago.layout.LayoutBox
getBorderBottom, getBorderLeft, getBorderRight, getBorderTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, setBorderBottom, setBorderLeft, setBorderRight, setBorderTop, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop
 
Methods inherited from interface org.apache.myfaces.tobago.layout.LayoutComponent
getColumnSpan, getDisplay, getHorizontalIndex, getRowSpan, getVerticalIndex, isRendered, setColumnSpan, setDisplay, setHorizontalIndex, setRowSpan, setVerticalIndex
 
Methods inherited from interface org.apache.myfaces.tobago.layout.LayoutBase
getCurrentHeight, getCurrentWidth, getHeight, getLeft, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getPreferredHeight, getPreferredWidth, getTop, getWidth, setCurrentHeight, setCurrentWidth, setHeight, setLeft, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaximumHeight, setMaximumWidth, setMinimumHeight, setMinimumWidth, setPreferredHeight, setPreferredWidth, setTop, setWidth
 
Methods inherited from interface org.apache.myfaces.tobago.config.Configurable
getCurrentMarkup, getRendererType
 
Methods inherited from interface org.apache.myfaces.tobago.component.SupportsRenderedPartially
getRenderedPartially, setRenderedPartially
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

FACET_SORTER

@Deprecated
public static final String FACET_SORTER
Deprecated. Please use Facets instead. Will be removed after Tobago 1.5.0
See Also:
Facets, Constant Field Values

SORTER_ID

public static final String SORTER_ID
See Also:
Constant Field Values

ATTR_SCROLL_POSITION

@Deprecated
public static final String ATTR_SCROLL_POSITION
Deprecated. Please use Attributes instead. Will be removed after Tobago 1.5.0
See Also:
Attributes, Constant Field Values

NONE

public static final String NONE
See Also:
Constant Field Values

SINGLE

public static final String SINGLE
See Also:
Constant Field Values

MULTI

public static final String MULTI
See Also:
Constant Field Values
Constructor Detail

AbstractUISheet

public AbstractUISheet()
Method Detail

getLayoutComponentRenderer

public LayoutComponentRenderer getLayoutComponentRenderer(javax.faces.context.FacesContext context)

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext facesContext)
                 throws IOException
Overrides:
encodeBegin in class javax.faces.component.UIData
Throws:
IOException

setState

public void setState(SheetState state)

getState

public SheetState getState()

getSheetState

public SheetState getSheetState(javax.faces.context.FacesContext facesContext)

getColumns

public abstract String getColumns()

getColumnLayout

public LayoutTokens getColumnLayout()

resetColumnWidths

public void resetColumnWidths()
Remove the (by user) resized column widths. An application may provide a button to access it. Since 1.0.26.


getLast

public int getLast()
Deprecated. The name of this method is ambiguous. You may use getLastRowIndexOfCurrentPage(). Deprecated since 1.5.5.


getLastRowIndexOfCurrentPage

public int getLastRowIndexOfCurrentPage()
The rowIndex of the last row on the current page plus one (because of zero based iterating).

Throws:
IllegalArgumentException - If the number of rows in the model returned by UIData.getRowCount() is -1 (undefined).

getCurrentPage

public int getCurrentPage()
Returns:
returns the current page (based by 0).

getPage

@Deprecated
public int getPage()
Deprecated. Please use getCurrentPage() which returns the value zero-based. Deprecated since 1.5.5.

Returns:
returns the current page (based by 1).

getPages

public int getPages()
The number of pages to render.

Throws:
IllegalArgumentException - If the number of rows in the model returned by UIData.getRowCount() is -1 (undefined).

getRenderedChildrenOf

public List<javax.faces.component.UIComponent> getRenderedChildrenOf(javax.faces.component.UIColumn column)

isAtBeginning

public boolean isAtBeginning()
Returns:
Is the interval to display starting with the first row?

hasRowCount

public boolean hasRowCount()
Returns:
Does the data model knows the number of rows?

hasRows

@Deprecated
public boolean hasRows()
Deprecated. The name of this method is ambiguous. You may use isRowsUnlimited(). Deprecated since 1.5.5.


isRowsUnlimited

public boolean isRowsUnlimited()
Returns:
Is the (maximum) number of rows to display set to zero?

isPagingVisible

public boolean isPagingVisible()
Returns:
Should the paging controls be rendered? Either because of the need of paging or because the show is enforced by isShowPagingAlways()

needMoreThanOnePage

public boolean needMoreThanOnePage()
Returns:
Is panging needed to display all rows? If the number of rows is unknown this method returns true.

isShowPagingAlways

public abstract boolean isShowPagingAlways()

isAtEnd

public boolean isAtEnd()

getLastPageIndex

@Deprecated
public int getLastPageIndex()
Deprecated. The name of this method is ambiguous. You may use getFirstRowIndexOfLastPage(). Deprecated since 1.5.5.


getFirstRowIndexOfLastPage

public int getFirstRowIndexOfLastPage()
Determines the beginning of the last page in the model. If the number of rows to display on one page is unlimited, the value is 0 (there is only one page).

Returns:
The index of the first row of the last paging page.
Throws:
IllegalArgumentException - If the number of rows in the model returned by UIData.getRowCount() is -1 (undefined).

processUpdates

public void processUpdates(javax.faces.context.FacesContext context)
Overrides:
processUpdates in class javax.faces.component.UIData

saveState

public Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIData

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         Object savedState)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIData

getAllColumns

public List<javax.faces.component.UIColumn> getAllColumns()

getRenderedColumns

public List<javax.faces.component.UIColumn> getRenderedColumns()

queueEvent

public void queueEvent(javax.faces.event.FacesEvent facesEvent)
Overrides:
queueEvent in class javax.faces.component.UIData

broadcast

public void broadcast(javax.faces.event.FacesEvent facesEvent)
               throws javax.faces.event.AbortProcessingException
Overrides:
broadcast in class javax.faces.component.UIData
Throws:
javax.faces.event.AbortProcessingException

addStateChangeListener

public void addStateChangeListener(SheetStateChangeListener listener)
Specified by:
addStateChangeListener in interface SheetStateChangeSource

getStateChangeListeners

public SheetStateChangeListener[] getStateChangeListeners()
Specified by:
getStateChangeListeners in interface SheetStateChangeSource

removeStateChangeListener

public void removeStateChangeListener(SheetStateChangeListener listener)
Specified by:
removeStateChangeListener in interface SheetStateChangeSource

getWidthList

public List<Integer> getWidthList()

setWidthList

public void setWidthList(List<Integer> widthList)

getScrollPosition

public Integer[] getScrollPosition()

findComponent

public javax.faces.component.UIComponent findComponent(String searchId)
Overrides:
findComponent in class javax.faces.component.UIComponentBase

stripRowIndex

public String stripRowIndex(String searchId)

invokeOnComponent

public boolean invokeOnComponent(javax.faces.context.FacesContext facesContext,
                                 String clientId,
                                 javax.faces.component.ContextCallback callback)
                          throws javax.faces.FacesException
Specified by:
invokeOnComponent in interface InvokeOnComponent
Overrides:
invokeOnComponent in class javax.faces.component.UIData
Throws:
javax.faces.FacesException

performPaging

public void performPaging(PageActionEvent pageEvent)

getComponents

public List<LayoutComponent> getComponents()
Specified by:
getComponents in interface LayoutContainer

onComponentPopulated

public void onComponentPopulated(javax.faces.context.FacesContext facesContext,
                                 javax.faces.component.UIComponent parent)
Specified by:
onComponentPopulated in interface OnComponentPopulated

getLayoutManager

public LayoutManager getLayoutManager()
Specified by:
getLayoutManager in interface LayoutContainer

setLayoutManager

public void setLayoutManager(LayoutManager layoutManager)
Specified by:
setLayoutManager in interface LayoutContainer

isLayoutChildren

public boolean isLayoutChildren()
Description copied from interface: LayoutContainer
Should the children of the this component be laid out from the given layout manager.

Specified by:
isLayoutChildren in interface LayoutContainer

isShowHeader

public abstract boolean isShowHeader()

getNeedVerticalScrollbar

public Boolean getNeedVerticalScrollbar()

setNeedVerticalScrollbar

public void setNeedVerticalScrollbar(Boolean needVerticalScrollbar)


Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.