|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIData
public class UIData
UIData is a UIComponent that supports data
binding to a collection of data objects represented by a DataModel
instance, which is the current value of this component itself (typically
established via a ValueExpression). During iterative processing over
the rows of data in the data model, the object for the current row is exposed
as a request attribute under the key specified by the var
property.
Only children of type UIColumn should be processed by renderers
associated with this component.
By default, the rendererType property is set to
javax.faces.Table. This value can be changed by calling the
setRendererType() method.
| Field Summary | |
|---|---|
static String |
COMPONENT_FAMILY
The standard component family for this component. |
static String |
COMPONENT_TYPE
The standard component type for this component. |
| Fields inherited from class javax.faces.component.UIComponent |
|---|
BEANINFO_KEY, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY |
| Fields inherited from interface javax.faces.component.NamingContainer |
|---|
SEPARATOR_CHAR |
| Constructor Summary | |
|---|---|
UIData()
Create a new UIData instance with default property
values. |
|
| Method Summary | |
|---|---|
void |
broadcast(FacesEvent event)
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. |
String |
createUniqueId(FacesContext context,
String seed)
Generate an identifier for a component. |
void |
encodeBegin(FacesContext context)
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. |
String |
getClientId(FacesContext context)
Return a client identifier for this component that includes the current value of the rowIndex property, if it is not set to
-1. |
String |
getFamily()
Return the identifier of the component family to which this component belongs. |
int |
getFirst()
Return the zero-relative row number of the first row to be displayed. |
UIComponent |
getFooter()
Return the footer facet of this component (if any). |
UIComponent |
getHeader()
Return the header facet of this component (if any). |
int |
getRowCount()
Return the number of rows in the underlying data model. |
Object |
getRowData()
Return the data object representing the data for the currently selected row index, if any. |
int |
getRowIndex()
Return the zero-relative index of the currently selected row. |
int |
getRows()
Return the number of rows to be displayed, or zero for all remaining rows in the table. |
Object |
getValue()
Return the value of the UIData. |
String |
getVar()
Return the request-scope attribute under which the data object for the current row will be exposed when iterating. |
boolean |
invokeOnComponent(FacesContext context,
String clientId,
ContextCallback callback)
Override behavior from UIComponentBase.invokeOnComponent(javax.faces.context.FacesContext, java.lang.String, javax.faces.component.ContextCallback) to provide special care for
positioning the data properly before finding the component and
invoking the callback on it. |
boolean |
isRowAvailable()
Return a flag indicating whether there is rowData
available at the current rowIndex. |
void |
processDecodes(FacesContext context)
Override the default UIComponentBase.processDecodes(javax.faces.context.FacesContext) processing
to perform the following steps. |
void |
processUpdates(FacesContext context)
Override the default UIComponentBase.processUpdates(javax.faces.context.FacesContext)
processing to perform the following steps. |
void |
processValidators(FacesContext context)
Override the default UIComponentBase.processValidators(javax.faces.context.FacesContext)
processing to perform the following steps. |
void |
queueEvent(FacesEvent event)
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(). |
void |
setFirst(int first)
Set the zero-relative row number of the first row to be displayed. |
void |
setFooter(UIComponent footer)
Set the footer facet of this component. |
void |
setHeader(UIComponent header)
Set the header facet of this component. |
void |
setRowIndex(int rowIndex)
Set the zero relative index of the current row, or -1 to indicate that no row is currently selected, by implementing the following algorithm. |
void |
setRows(int rows)
Set the number of rows to be displayed, or zero for all remaining rows in the table. |
void |
setValue(Object value)
Set the value of the UIData. |
void |
setValueBinding(String name,
ValueBinding binding)
Deprecated. This has been replaced by setValueExpression(java.lang.String,
javax.el.ValueExpression). |
void |
setValueExpression(String name,
javax.el.ValueExpression binding)
Set the ValueExpression used to calculate the value for the
specified attribute or property name, if any. |
void |
setVar(String var)
Set the request-scope attribute under which the data object for the current row wil be exposed when iterating. |
boolean |
visitTree(VisitContext context,
VisitCallback callback)
Override the behavior in |
| Methods inherited from class javax.faces.component.UIComponentBase |
|---|
addClientBehavior, clearInitialState, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getDefaultEventName, getEventNames, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient |
| Methods inherited from class javax.faces.component.UIComponent |
|---|
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getValueExpression, initialStateMarked, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, setInView, subscribeToEvent, unsubscribeFromEvent |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMPONENT_TYPE
The standard component type for this component.
public static final String COMPONENT_FAMILY
The standard component family for this component.
| Constructor Detail |
|---|
public UIData()
Create a new UIData instance with default property
values.
| Method Detail |
|---|
public String getFamily()
UIComponentReturn the identifier of the component family to which this
component belongs. This identifier, in conjunction with the value
of the rendererType property, may be used to select
the appropriate Renderer for this component instance.
getFamily in class UIComponentpublic int getFirst()
Return the zero-relative row number of the first row to be displayed.
public void setFirst(int first)
Set the zero-relative row number of the first row to be displayed.
first - New first row number
IllegalArgumentException - if first is negativepublic UIComponent getFooter()
Return the footer facet of this component (if any). A convenience
method for getFacet("footer").
public void setFooter(UIComponent footer)
Set the footer facet of this component. A convenience method for
getFacets().put("footer", footer).
footer - the new footer facet
NullPointerException - if footer is nullpublic UIComponent getHeader()
Return the header facet of this component (if any). A convenience
method for getFacet("header").