content
The ITableContentProvider
associated with this component, lazily instantiated
if requested. This object is not part of the saved and restored state of
the component.
IDynamicComponent
, IExtendedTable
, ITableRowStateHolder
, Serializable
, EventListener
, ClientBehaviorHolder
, NamingContainer
, PartialStateHolder
, StateHolder
, TransientStateHolder
, UniqueIdVendor
, ComponentSystemEventListener
, FacesListener
, SystemEventListenerHolder
AsyncTable
, CategorizedTable
, Chart
, DataList
, DataTree
, SearchResultTable
static class
static class
DataTable.ExportActionEvent
.IExtendedTable.RowMovement
protected ITableContentProvider
ITableContentProvider
associated with this component, lazily instantiated
if requested.protected int
protected static final int
protected String[]
protected String[]
protected IExtendedTable.RowMovement[]
protected String[]
SavedState
instances for each descendant
component, keyed by the client identifier of the descendant.protected boolean
protected SortInfo
protected SortInfo
protected String
static final String
COMPONENT_TYPE
COMPONENT_FAMILY
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
SEPARATOR_CHAR
void
broadcast(FacesEvent event)
UIComponentBase.broadcast(javax.faces.event.FacesEvent)
processing to
unwrap any wrapped FacesEvent
and reset the current row index,
before the event is actually broadcast.protected void
protected void
clearDescendantState(UIComponent component,
FacesContext context)
void
encodeBegin(FacesContext context)
protected void
filter()
protected String
boolean
getClientId(FacesContext context)
rowIndex
property, if it is not set to -1.protected ITableContentProvider
getContentProvider(boolean applyLazyRowIndex)
protected UIComponent
int
getFirst()
int
getRowId()
int
int
getRows()
String[]
String[]
String[]
getSortInfo(boolean keysNotColumnIds)
protected boolean
boolean
rowData
available at the current rowIndex
.boolean
protected void
iterate(FacesContext context,
PhaseId phaseId)
rowIndex
property to -1, and process the
facets of this UIData
component exactly once.
Set the rowIndex
property to -1, and process the
facets of the UIColumn
children of this UIData
component
exactly once.
Iterate over the relevant rows, based on the first
and row
properties, and process the children of the
UIColumn
children of this UIData
component once per row.
protected boolean
keepSaved(FacesContext context)
true
if we need to keep the saved per-child state
information.void
protected void
prepareForEncode(FacesContext context)
protected void
processColumnChild(FacesContext context,
UIComponent component,
PhaseId phaseId)
void
processDecodes(FacesContext context)
UIComponentBase.processDecodes(javax.faces.context.FacesContext)
processing to
perform the following steps.void
processUpdates(FacesContext context)
UIComponentBase.processUpdates(javax.faces.context.FacesContext)
processing to
perform the following steps.void
processValidators(FacesContext context)
UIComponentBase.processValidators(javax.faces.context.FacesContext)
processing
to perform the following steps.void
queueEvent(FacesEvent event)
UIComponentBase.queueEvent(javax.faces.event.FacesEvent)
processing to
wrap any queued events in a wrapper so that we can reset the current row
index in broadcast()
.void
void
protected void
setRowIndex()
.protected void
restoreDescendantState(UIComponent component,
FacesContext context)
void
restoreState(FacesContext context,
Object state)
protected void
setRowIndex()
.protected void
saveDescendantState(UIComponent component,
FacesContext context)
void
void
setFirst(int first)
void
setLazyRowIndex(int rowIndex)
void
setRowById(String id)
void
setRowIndex(int rowIndex)
void
setRows(int rows)
void
setRowsToCreate(String[] create)
void
setRowsToDelete(String[] delete)
void
void
setRowsToUpdate(String[] update)
void
void
protected void
void
UIData
.void
setValueBinding(String name,
ValueBinding binding)
void
setValueExpression(String name,
ValueExpression binding)
protected void
sort()
protected String
toClientRowId(String id)
protected void
getBgcolor, getBodyrows, getBorder, getCaptionClass, getCaptionStyle, getCellpadding, getCellspacing, getColumnClasses, getDefaultEventName, getDir, getEventNames, getFooterClass, getFrame, getHeaderClass, getLang, getOnclick, getOndblclick, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRole, getRowClass, getRowClasses, getRules, getStyle, getStyleClass, getSummary, getTitle, getWidth, setBgcolor, setBodyrows, setBorder, setCaptionClass, setCaptionStyle, setCellpadding, setCellspacing, setColumnClasses, setDir, setFooterClass, setFrame, setHeaderClass, setLang, setOnclick, setOndblclick, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setRole, setRowClass, setRowClasses, setRules, setStyle, setStyleClass, setSummary, setTitle, setWidth
createUniqueId, getDataModel, getFamily, getFooter, getHeader, getValue, getVar, invokeOnComponent, isRowStatePreserved, markInitialState, saveState, setDataModel, setFooter, setHeader, setRowStatePreserved, setVar, visitTree
addClientBehavior, addFacesListener, clearInitialState, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addClientBehavior, getClientBehaviors
The ITableContentProvider
associated with this component, lazily instantiated
if requested. This object is not part of the saved and restored state of
the component.
This map contains SavedState
instances for each descendant
component, keyed by the client identifier of the descendant. Because
descendant client identifiers will contain the rowIndex
value of the parent, per-row state information is actually preserved.
Return the zero-relative row number of the first row to be displayed.
Set the zero-relative row number of the first row to be displayed.
setFirst
in class UIData
first
- New first row numberIllegalArgumentException
- if first
is negative
Return a flag indicating whether there is rowData
available at the current rowIndex
. If no
wrappedData
is available, return false
.
isRowAvailable
in class UIData
FacesException
- if an error occurs getting the row availabilityReturn the number of rows in the underlying data model. If the number of available rows is unknown, return -1.
getRowCount
in class UIData
FacesException
- if an error occurs getting the row countReturn the data object representing the data for the currently selected row index, if any.
getRowData
in class UIData
FacesException
- if an error occurs getting the row dataIllegalArgumentException
- if now row data is available at the currently specified
row indexReturn the zero-relative index of the currently selected row. If were not currently positioned on a row, return -1. This property is not enabled for value binding expressions.
getRowIndex
in class UIData
FacesException
- if an error occurs getting the row indexrowIndex
- the row index
Set the zero relative index of the current row, or -1 to indicate that no
row is currently selected, by implementing the following algorithm. It is
possible to set the row index at a value for which the underlying data
collection does not contain any row data. Therefore, callers may use the
isRowAvailable()
method to detect whether row data will be
available for use by the getRowData()
method.
DataModel
associated with this UIData
instance.rowIndex
value is -1:
var
property is not null, remove the
corresponding request scope attribute (if any).rowIndex
value is not -1:
var
property is not null, call
getRowData()
and expose the resulting data object as a
request scope attribute whose key is the var
property
value.
To save current state information for all descendant components,
UIData
must maintain per-row information for each descendant as
follows:
EditableValueHolder
,
save the state of its localValue
property.EditableValueHolder
,
save the state of the localValueSet
property.EditableValueHolder
,
save the state of the valid
property.EditableValueHolder
,
save the state of the submittedValue
property.
To restore current state information for all descendant components,
UIData
must reference its previously stored information for the
current rowIndex
and call setters for each descendant as
follows:
EditableValueHolder
,
restore the value
property.EditableValueHolder
,
restore the state of the localValueSet
property.EditableValueHolder
,
restore the state of the valid
property.EditableValueHolder
,
restore the state of the submittedValue
property.setRowIndex
in class UIData
rowIndex
- The new row index value, or -1 for no associated rowFacesException
- if an error occurs setting the row indexIllegalArgumentException
- if rowIndex
is less than -1Return the number of rows to be displayed, or zero for all remaining rows in the table. The default value of this property is zero.
Set the number of rows to be displayed, or zero for all remaining rows in the table.
setRows
in class UIData
rows
- New number of rowsIllegalArgumentException
- if rows
is negativerestoreState
in interface StateHolder
restoreState
in class UIData
setValueExpression(String, ValueExpression)
instead.
Set the ValueBinding
used to calculate the value for the
specified attribute or property name, if any. In addition, if a
ValueBinding
is set for the value
property, remove
any synthesized DataModel
for the data previously bound to this
component.
setValueBinding
in class UIData
name
- Name of the attribute or property for which to set a
ValueBinding
binding
- The ValueBinding
to set, or null
to
remove any currently set ValueBinding
IllegalArgumentException
- if name
is one of id
,
parent
, var
, or
rowIndex
NullPointerException
- if name
is null
setValueExpression
in class UIData
Return a client identifier for this component that includes the current
value of the rowIndex
property, if it is not set to -1.
This implies that multiple calls to getClientId()
may
return different results, but ensures that child components can
themselves generate row-specific client identifiers (since UIData
is a NamingContainer
).
getClientId
in class UIData
NullPointerException
- if context
is null
Override the default UIComponentBase.queueEvent(javax.faces.event.FacesEvent)
processing to
wrap any queued events in a wrapper so that we can reset the current row
index in broadcast()
.
queueEvent
in class UIData
event
- FacesEvent
to be queuedIllegalStateException
- if this component is not a descendant of a
UIViewRoot
NullPointerException
- if event
is null
Override the default UIComponentBase.broadcast(javax.faces.event.FacesEvent)
processing to
unwrap any wrapped FacesEvent
and reset the current row index,
before the event is actually broadcast. For events that we did not wrap
(in queueEvent()
), default processing will occur.
broadcast
in class UIData
event
- The FacesEvent
to be broadcastAbortProcessingException
- Signal the JavaServer Faces implementation that no further
processing on the current event should be performedIllegalArgumentException
- if the implementation class of this FacesEvent
is
not supported by this componentNullPointerException
- if event
is null
In addition to the default behavior, ensure that any saved per-row state for our child input components is discarded unless it is needed to rerender the current page with errors.
encodeBegin
in class UIData
context
- FacesContext for the current requestIOException
- if an input/output error occurs while renderingNullPointerException
- if context
is null
context
- FacesContext for the current request
Override the default UIComponentBase.processDecodes(javax.faces.context.FacesContext)
processing to
perform the following steps.
rendered
property of this UIComponent
is false
, skip further processing.rowIndex
to -1.processDecodes()
method of all facets of
this UIData
, in the order determined by a call to
getFacets().keySet().iterator()
.processDecodes()
method of all facets of the
UIColumn
children of this UIData
.first
and
rows
properties), performing the following processing for
each row:
rowIndex
to -1.decode()
method of this component.RuntimeException
is thrown during decode
processing, call FacesContext.renderResponse()
and re-throw the
exception.processDecodes
in class UIData
context
- FacesContext
for the current requestNullPointerException
- if context
is null
Override the default UIComponentBase.processValidators(javax.faces.context.FacesContext)
processing
to perform the following steps.
rendered
property of this UIComponent
is false
, skip further processing.rowIndex
to -1.processValidators()
method of all facets of
this UIData
, in the order determined by a call to
getFacets().keySet().iterator()
.processValidators()
method of all facets of
the UIColumn
children of this UIData
.first
and
rows
properties), performing the following processing for
each row:
rowIndex
to -1.processValidators
in class UIData
context
- FacesContext
for the current requestNullPointerException
- if context
is null
Override the default UIComponentBase.processUpdates(javax.faces.context.FacesContext)
processing to
perform the following steps.
rendered
property of this UIComponent
is false
, skip further processing.rowIndex
to -1.processUpdates()
method of all facets of
this UIData
, in the order determined by a call to
getFacets().keySet().iterator()
.processUpdates()
method of all facets of the
UIColumn
children of this UIData
.first
and
rows
properties), performing the following processing for
each row:
rowIndex
to -1.processUpdates
in class UIData
context
- FacesContext
for the current requestNullPointerException
- if context
is null
getTableRowState
in interface ITableRowStateHolder
setTableRowState
in interface ITableRowStateHolder
IExtendedTable
getSortInfo
in interface IExtendedTable
keysNotColumnIds
- True to report keys using column "sort" property,
false to report keys using column ids.IExtendedTable
getRowId
in interface IExtendedTable
IExtendedTable
setRowById
in interface IExtendedTable
IExtendedTable
getCanTemplateRow
in interface IExtendedTable
IExtendedTable
isTemplateRow
in interface IExtendedTable
IExtendedTable
setTemplateRow
in interface IExtendedTable
IExtendedTable
getRowsToCreate
in interface IExtendedTable
IExtendedTable
setRowsToCreate
in interface IExtendedTable
IExtendedTable
getRowsToMove
in interface IExtendedTable
IExtendedTable
setRowsToMove
in interface IExtendedTable
IExtendedTable
getRowsToDelete
in interface IExtendedTable
IExtendedTable
setRowsToDelete
in interface IExtendedTable
IExtendedTable
getRowsToUpdate
in interface IExtendedTable
IExtendedTable
setRowsToUpdate
in interface IExtendedTable
IExtendedTable
convertOriginalToCreatedRowIds
in interface IExtendedTable
IExtendedTable
convertCreatedToOriginalRowIds
in interface IExtendedTable
IExtendedTable
getFilter
in interface IExtendedTable
IExtendedTable
setFilter
in interface IExtendedTable
IExtendedTable
resetRowCaches
in interface IExtendedTable
Perform the appropriate phase-specific processing and per-row iteration for the specified phase, as follows:
rowIndex
property to -1, and process the
facets of this UIData
component exactly once.rowIndex
property to -1, and process the
facets of the UIColumn
children of this UIData
component
exactly once.first
and row
properties, and process the children of the
UIColumn
children of this UIData
component once per row.context
- FacesContext
for the current requestphaseId
- PhaseId
of the phase we are currently running
Return true
if we need to keep the saved per-child state
information. This will be the case if any of the following are true:
UIData
instance is nested inside of another
UIData
instancecontext
- FacesContext
for the current request
Restore state information for all descendant components, as described for
setRowIndex()
.
Restore state information for the specified component and its descendants.
component
- Component for which to restore state informationcontext
- FacesContext
for the current request
Save state information for all descendant components, as described for
setRowIndex()
.
Save state information for the specified component and its descendants.
component
- Component for which to save state informationcontext
- FacesContext
for the current requestgetContentProvider
in interface IExtendedTable
applyLazyRowIndex
- Apply the lazy row index if it is available.IDynamicComponent
populateInitialComponents
in interface IDynamicComponent
setValueExpression(String, ValueExpression)
instead.