oracle.adf.view.faces.component
Class TableBase

java.lang.Object
  |
  +--javax.faces.component.UIComponent
        |
        +--oracle.adf.view.faces.component.UIXComponent
              |
              +--oracle.adf.view.faces.component.UIXComponentBase
                    |
                    +--oracle.adf.view.faces.component.CollectionBase
                          |
                          +--oracle.adf.view.faces.component.TableBase
All Implemented Interfaces:
CollectionComponent, javax.faces.component.NamingContainer, javax.faces.component.StateHolder
Direct Known Subclasses:
UIXTable

public abstract class TableBase
extends CollectionBase
implements javax.faces.component.NamingContainer, CollectionComponent

Base class for the Table component. The behaviour supported by this base class include record navigation, sorting, selection and detail-disclosure.


Field Summary
 
Fields inherited from class oracle.adf.view.faces.component.UIXComponentBase
ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY, TYPE
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
TableBase()
           
 
Method Summary
 void addGotoListener(GotoListener listener)
          Adds a GotoListener.
 void addSortListener(SortListener listener)
          Adds a SortListener.
 void encodeBegin(javax.faces.context.FacesContext context)
           
abstract  javax.faces.component.UIComponent getDetail()
          Gets the component used to display the details of a row.
abstract  javax.faces.el.MethodBinding getDisclosureListener()
           
abstract  RowKeySet getDisclosureState()
          Gets the state associated with detail-disclosure
abstract  int getFirst()
          Gets the index of the first row that is currently visible.
abstract  javax.faces.el.MethodBinding getGotoListener()
           
 GotoListener[] getGotoListeners()
          Retrieves all GotoListeners
protected  java.lang.String getLocalClientId()
          Gets the client-id of this table, without any NamingContainers.
 int getRowCount()
          Gets the total number of rows in this table.
 java.lang.Object getRowData()
          Gets the data for the current row.
 int getRowIndex()
          Gets the index of the current row.
 java.lang.String getRowKey()
          Gets the row-key of the current row.
abstract  int getRows()
          Gets the maximum number of rows that this table will display at a time.
abstract  RowKeySet getSelectionState()
          Gets the state associated with selection
 java.lang.String getSortBy()
          Gets the property that this model is currently sorted by.
abstract  javax.faces.el.MethodBinding getSortListener()
           
 SortListener[] getSortListeners()
          Retrieves all SortListeners
 boolean getSortOrder()
          the direction in which this table is sorted.
abstract  java.lang.Object getValue()
          Gets the underlying model being displayed by this table.
abstract  boolean isImmediate()
          If this returns true, then the events generated by this table (such as GotoEvent, SortEvent and DisclosureEvent) will not perform any validation.
 boolean isRowAvailable()
          Checks to see if the current row is available.
 boolean isSortable(java.lang.String property)
           
 void processDecodes(javax.faces.context.FacesContext context)
          Decodes this component before decoding the facets.
 void processUpdates(javax.faces.context.FacesContext context)
          Updates this component before updating the facets.
 void removeGotoListener(GotoListener listener)
          Removes a GotoListener.
 void removeSortListener(SortListener listener)
          Removes a SortListener.
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
abstract  void setDisclosureState(RowKeySet state)
          Sets the state associated with detail-disclosure.
abstract  void setFirst(int first)
          Sets the index of the first row that is currently visible.
 void setRowIndex(int rowIndex)
          Makes a row current.
 void setRowKey(java.lang.String rowKey)
          Makes a row current.
abstract  void setSelectionState(RowKeySet model)
          Sets the state associated with selection
 void sort(java.lang.String property, boolean isAscending)
          Sort the underlying model using the given parameters.
 
Methods inherited from class oracle.adf.view.faces.component.CollectionBase
broadcast, getVar, processValidators, queueEvent
 
Methods inherited from class oracle.adf.view.faces.component.UIXComponentBase
addFacesListener, createFacesBean, decode, encodeChildren, encodeEnd, findComponent, getAttribute, getAttributes, getBeanType, getBooleanProperty, getChildCount, getChildren, getClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getFamily, getId, getIntProperty, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, setAttribute, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.adf.view.faces.component.CollectionComponent
getVar
 

Constructor Detail

TableBase

public TableBase()
Method Detail

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
Overrides:
encodeBegin in class UIXComponentBase
java.io.IOException

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)
Description copied from class: CollectionBase
Decodes this component before decoding the facets. Decodes the children as many times as they are stamped.

Overrides:
processDecodes in class CollectionBase
Parameters:
context -

processUpdates

public void processUpdates(javax.faces.context.FacesContext context)
Description copied from class: CollectionBase
Updates this component before updating the facets. Updates the children as many times as they are stamped.

Overrides:
processUpdates in class CollectionBase
Parameters:
context -

setDisclosureState

public abstract void setDisclosureState(RowKeySet state)
Sets the state associated with detail-disclosure.

Parameters:
state - the new disclosure state.

getDisclosureState

public abstract RowKeySet getDisclosureState()
Gets the state associated with detail-disclosure


getSelectionState

public abstract RowKeySet getSelectionState()
Gets the state associated with selection

Specified by:
getSelectionState in interface CollectionComponent

setSelectionState

public abstract void setSelectionState(RowKeySet model)
Sets the state associated with selection

Parameters:
model - the new selection state

getValue

public abstract java.lang.Object getValue()
Gets the underlying model being displayed by this table.


getRows

public abstract int getRows()
Gets the maximum number of rows that this table will display at a time.

Specified by:
getRows in interface CollectionComponent
Returns:
zero if all rows are displayed.

getFirst

public abstract int getFirst()
Gets the index of the first row that is currently visible.

Specified by:
getFirst in interface CollectionComponent
Returns:
zero-based index of the first visible row.

setFirst

public abstract void setFirst(int first)
Sets the index of the first row that is currently visible.

Parameters:
first - zero-based index of the first visible row.

getDetail

public abstract javax.faces.component.UIComponent getDetail()
Gets the component used to display the details of a row.


getRowData

public final java.lang.Object getRowData()
Gets the data for the current row.

Specified by:
getRowData in interface CollectionComponent
Specified by:
getRowData in class CollectionBase
Returns:
null if the current row is unavailable
See Also:
DataModel.getRowData()

getRowIndex

public final int getRowIndex()
Gets the index of the current row.

Specified by:
getRowIndex in interface CollectionComponent
Returns:
-1 if the current row is unavailable.
See Also:
DataModel.getRowIndex()

setRowIndex

public final void setRowIndex(int rowIndex)
Makes a row current.

Specified by:
setRowIndex in interface CollectionComponent
Parameters:
rowIndex - the zero-based row-index of the row that should be made current. Use -1 to clear the current row.
See Also:
DataModel.setRowIndex(int)

getRowKey

public final java.lang.String getRowKey()
Gets the row-key of the current row.

Specified by:
getRowKey in interface CollectionComponent
Specified by:
getRowKey in class CollectionBase
Returns:
null if the current row is unavailable.
See Also:
CollectionModel.getRowKey()

setRowKey

public final void setRowKey(java.lang.String rowKey)
Makes a row current.

Specified by:
setRowKey in interface CollectionComponent
Specified by:
setRowKey in class CollectionBase
Parameters:
rowKey - the row-key of the row that should be made current. Use null to clear the current row.
See Also:
CollectionModel.setRowKey(java.lang.String)

isRowAvailable

public final boolean isRowAvailable()
Checks to see if the current row is available. This is useful when the total number of rows is not known.

Specified by:
isRowAvailable in interface CollectionComponent
Specified by:
isRowAvailable in class CollectionBase
Returns:
true iff the current row is available.
See Also:
DataModel.isRowAvailable()

getRowCount

public final int getRowCount()
Gets the total number of rows in this table.

Specified by:
getRowCount in interface CollectionComponent
Returns:
-1 if the total number is not known.
See Also:
DataModel.getRowCount()

isSortable

public final boolean isSortable(java.lang.String property)
Parameters:
property - a property name in the model
Returns:
true if the model is sortable by the given property.
See Also:
CollectionModel.isSortable(java.lang.String)

sort

public final void sort(java.lang.String property,
                       boolean isAscending)
Sort the underlying model using the given parameters.

See Also:
CollectionModel.sort(java.lang.String, boolean)

getSortOrder

public final boolean getSortOrder()
the direction in which this table is sorted.

Returns:
true if ascending. false if descending.
See Also:
CollectionModel.getSortOrder()

getSortBy

public final java.lang.String getSortBy()
Gets the property that this model is currently sorted by.

See Also:
CollectionModel.getSortBy()

getLocalClientId

protected java.lang.String getLocalClientId()
Gets the client-id of this table, without any NamingContainers. This id changes depending on the current row.

Overrides:
getLocalClientId in class UIXComponentBase
Returns:
the local clientId

getGotoListener

public abstract javax.faces.el.MethodBinding getGotoListener()

getSortListener

public abstract javax.faces.el.MethodBinding getSortListener()

getDisclosureListener

public abstract javax.faces.el.MethodBinding getDisclosureListener()

isImmediate

public abstract boolean isImmediate()
If this returns true, then the events generated by this table (such as GotoEvent, SortEvent and DisclosureEvent) will not perform any validation.

Returns:
whether the table is immediate

addGotoListener

public void addGotoListener(GotoListener listener)
Adds a GotoListener.


removeGotoListener

public void removeGotoListener(GotoListener listener)
Removes a GotoListener.


getGotoListeners

public GotoListener[] getGotoListeners()
Retrieves all GotoListeners


addSortListener

public void addSortListener(SortListener listener)
Adds a SortListener.


removeSortListener

public void removeSortListener(SortListener listener)
Removes a SortListener.


getSortListeners

public SortListener[] getSortListeners()
Retrieves all SortListeners


saveState

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

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class UIXComponentBase


Copyright © 2003-2004 Oracle Corporation. All Rights Reserved.