public abstract class UIDataAdaptor extends javax.faces.component.UIComponentBase implements javax.faces.component.NamingContainer, javax.faces.component.UniqueIdVendor, IterationStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.SystemEventListener
Modifier and Type | Class and Description |
---|---|
protected class |
UIDataAdaptor.ComponentVisitor
Base class for visit data model at phases decode, validation and update model
|
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_FAMILY
The standard component family for this component.
|
static String |
COMPONENT_TYPE
The standard component type for this component.
|
protected UIDataAdaptor.ComponentVisitor |
decodeVisitor
Visitor for process decode on children components.
|
protected UIDataAdaptor.ComponentVisitor |
updateVisitor
Visitor for process update model phase.
|
protected UIDataAdaptor.ComponentVisitor |
validateVisitor
Visitor for process validation phase
|
Constructor and Description |
---|
UIDataAdaptor() |
Modifier and Type | Method and Description |
---|---|
protected Iterator<javax.faces.component.UIComponent> |
allFixedChildren() |
void |
broadcast(javax.faces.event.FacesEvent event) |
void |
captureOrigValue(javax.faces.context.FacesContext faces)
Save current state of data variable.
|
void |
clearExtendedDataModel() |
void |
clearInitialState() |
protected abstract DataComponentState |
createComponentState() |
protected abstract ExtendedDataModel<?> |
createExtendedDataModel() |
String |
createUniqueId(javax.faces.context.FacesContext context,
String seed) |
protected Iterator<javax.faces.component.UIComponent> |
dataChildren() |
protected void |
doUpdate() |
protected String |
extractKeySegment(javax.faces.context.FacesContext context,
String substring) |
protected Iterator<javax.faces.component.UIComponent> |
fixedChildren() |
DataComponentState |
getComponentState() |
String |
getContainerClientId() |
String |
getContainerClientId(javax.faces.context.FacesContext facesContext) |
protected ExtendedDataModel<?> |
getExtendedDataModel() |
String |
getFamily() |
Object |
getIterationState()
Get component state for a current iteration.
|
protected DataComponentState |
getLocalComponentState() |
int |
getRowCount() |
Object |
getRowData() |
Object |
getRowKey()
The attribute provides access to a row key in a Request scope
|
javax.faces.convert.Converter |
getRowKeyConverter() |
String |
getRowKeyVar() |
String |
getStateVar()
The attribute provides access to a component state on the client side
|
String |
getVar() |
protected Map<String,Object> |
getVariablesMap(javax.faces.context.FacesContext facesContext) |
boolean |
invokeOnComponent(javax.faces.context.FacesContext context,
String clientId,
javax.faces.component.ContextCallback callback) |
boolean |
invokeOnRow(javax.faces.context.FacesContext context,
String clientId,
javax.faces.component.ContextCallback callback) |
boolean |
isKeepSaved()
Boolean attribute that defines whether this iteration component will reset saved children's state before rendering.
|
boolean |
isListenerForSource(Object source) |
boolean |
isRowAvailable() |
protected void |
iterate(javax.faces.context.FacesContext faces,
UIDataAdaptor.ComponentVisitor visitor)
Perform iteration on all children components and all data rows with given visitor.
|
protected boolean |
keepSaved(javax.faces.context.FacesContext context)
Check for validation errors on children components.
|
void |
markInitialState() |
protected void |
preDecode(javax.faces.context.FacesContext context) |
protected void |
preEncodeBegin(javax.faces.context.FacesContext context) |
protected void |
preUpdate(javax.faces.context.FacesContext context) |
protected void |
preValidate(javax.faces.context.FacesContext context) |
void |
processDecodes(javax.faces.context.FacesContext faces) |
protected void |
processDecodesChildren(javax.faces.context.FacesContext faces) |
void |
processEvent(javax.faces.event.ComponentSystemEvent event) |
void |
processEvent(javax.faces.event.SystemEvent event) |
void |
processUpdates(javax.faces.context.FacesContext faces) |
protected void |
processUpdatesChildren(javax.faces.context.FacesContext faces) |
protected void |
processValidatesChildren(javax.faces.context.FacesContext faces) |
void |
processValidators(javax.faces.context.FacesContext faces) |
void |
queueEvent(javax.faces.event.FacesEvent event) |
protected void |
resetChildState() |
protected void |
resetDataModel() |
protected void |
restoreChildState(javax.faces.context.FacesContext facesContext) |
protected void |
restoreChildState(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component)
Restore values of
EditableValueHolder fields after change current row. |
void |
restoreOrigValue(javax.faces.context.FacesContext faces)
Restore value of data variable after processing phase.
|
void |
restoreState(javax.faces.context.FacesContext context,
Object stateObject) |
protected void |
saveChildState(javax.faces.context.FacesContext facesContext)
Save values of
EditableValueHolder fields before change current row. |
protected void |
saveChildState(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component) |
Object |
saveState(javax.faces.context.FacesContext context) |
protected void |
setExtendedDataModel(ExtendedDataModel<?> extendedDataModel) |
void |
setId(String id) |
void |
setIterationState(Object stateObject)
Set component state for the next iteration.
|
void |
setKeepSaved(boolean keepSaved) |
void |
setRowKey(javax.faces.context.FacesContext facesContext,
Object rowKey)
Setup current row by key.
|
void |
setRowKey(Object rowKey) |
void |
setRowKeyConverter(javax.faces.convert.Converter converter) |
void |
setRowKeyVar(String rowKeyVar) |
void |
setStateVar(String stateVar) |
protected void |
setupVariable(javax.faces.context.FacesContext faces,
boolean rowSelected)
Setup EL variable for different iteration.
|
void |
setValueExpression(String name,
javax.el.ValueExpression binding) |
void |
setVar(String var) |
protected boolean |
visitDataChildren(javax.faces.component.visit.VisitContext visitContext,
javax.faces.component.visit.VisitCallback callback,
boolean visitRows) |
protected javax.faces.component.visit.VisitResult |
visitDataChildrenMetaComponents(ExtendedVisitContext extendedVisitContext,
javax.faces.component.visit.VisitCallback callback) |
protected boolean |
visitFixedChildren(javax.faces.component.visit.VisitContext visitContext,
javax.faces.component.visit.VisitCallback callback) |
boolean |
visitTree(javax.faces.component.visit.VisitContext visitContext,
javax.faces.component.visit.VisitCallback callback) |
void |
walk(javax.faces.context.FacesContext faces,
DataVisitor visitor,
Object argument)
Walk ( visit ) this component on all data-aware children for each row.
|
protected javax.faces.event.FacesEvent |
wrapEvent(javax.faces.event.FacesEvent event) |
addClientBehavior, addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, setInView
public static final String COMPONENT_FAMILY
The standard component family for this component.
public static final String COMPONENT_TYPE
The standard component type for this component.
protected UIDataAdaptor.ComponentVisitor decodeVisitor
protected UIDataAdaptor.ComponentVisitor validateVisitor
protected UIDataAdaptor.ComponentVisitor updateVisitor
protected Map<String,Object> getVariablesMap(javax.faces.context.FacesContext facesContext)
public String getFamily()
getFamily
in class javax.faces.component.UIComponent
public String createUniqueId(javax.faces.context.FacesContext context, String seed)
createUniqueId
in interface javax.faces.component.UniqueIdVendor
public Object getRowKey()
public void setRowKey(javax.faces.context.FacesContext facesContext, Object rowKey)
UIData.setRowIndex(int)
, but for
key object - it may be not only row number in sequence data, but, for example - path to current node in tree.facesContext
- - current FacesContextrowKey
- new key value.protected void saveChildState(javax.faces.context.FacesContext facesContext)
EditableValueHolder
fields before change current row.facesContext
- protected void saveChildState(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
facesContext
- protected Iterator<javax.faces.component.UIComponent> dataChildren()
protected Iterator<javax.faces.component.UIComponent> fixedChildren()
protected Iterator<javax.faces.component.UIComponent> allFixedChildren()
protected void restoreChildState(javax.faces.context.FacesContext facesContext)
facesContext
- protected void restoreChildState(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
EditableValueHolder
fields after change current row.facesContext
- public void setRowKey(Object rowKey)
protected javax.faces.event.FacesEvent wrapEvent(javax.faces.event.FacesEvent event)
public void queueEvent(javax.faces.event.FacesEvent event)
queueEvent
in class javax.faces.component.UIComponentBase
public void broadcast(javax.faces.event.FacesEvent event) throws javax.faces.event.AbortProcessingException
broadcast
in class javax.faces.component.UIComponentBase
javax.faces.event.AbortProcessingException
protected ExtendedDataModel<?> getExtendedDataModel()
protected abstract ExtendedDataModel<?> createExtendedDataModel()
public void clearExtendedDataModel()
protected void setExtendedDataModel(ExtendedDataModel<?> extendedDataModel)
extendedDataModel
- the extendedDataModel to setpublic String getVar()
public void setVar(String var)
public String getRowKeyVar()
public void setRowKeyVar(String rowKeyVar)
public String getStateVar()
public void setStateVar(String stateVar)
public int getRowCount()
public Object getRowData()
public boolean isRowAvailable()
public boolean isKeepSaved()
public void setKeepSaved(boolean keepSaved)
protected void setupVariable(javax.faces.context.FacesContext faces, boolean rowSelected)
faces
- current faces contextrowSelected
- public DataComponentState getComponentState()
protected abstract DataComponentState createComponentState()
public javax.faces.convert.Converter getRowKeyConverter()
public void setRowKeyConverter(javax.faces.convert.Converter converter)
public String getContainerClientId()
public String getContainerClientId(javax.faces.context.FacesContext facesContext)
getContainerClientId
in class javax.faces.component.UIComponent
public void captureOrigValue(javax.faces.context.FacesContext faces)
faces
- current faces contextpublic void restoreOrigValue(javax.faces.context.FacesContext faces)
faces
- current faces contextpublic void setValueExpression(String name, javax.el.ValueExpression binding)
setValueExpression
in class javax.faces.component.UIComponent
protected boolean keepSaved(javax.faces.context.FacesContext context)
Check for validation errors on children components. If true, saved values must be keep on render phase
(State is reset if there are no faces messages with severity error or higher.)
protected void iterate(javax.faces.context.FacesContext faces, UIDataAdaptor.ComponentVisitor visitor)
faces
- visitor
- public void walk(javax.faces.context.FacesContext faces, DataVisitor visitor, Object argument)
faces
- visitor
- public void processDecodes(javax.faces.context.FacesContext faces)
processDecodes
in class javax.faces.component.UIComponentBase
public void processValidators(javax.faces.context.FacesContext faces)
processValidators
in class javax.faces.component.UIComponentBase
public void processUpdates(javax.faces.context.FacesContext faces)
processUpdates
in class javax.faces.component.UIComponentBase
protected void doUpdate()
protected void processDecodesChildren(javax.faces.context.FacesContext faces)
protected void processValidatesChildren(javax.faces.context.FacesContext faces)
protected void processUpdatesChildren(javax.faces.context.FacesContext faces)
public void setId(String id)
setId
in class javax.faces.component.UIComponentBase
public Object getIterationState()
IterationStateHolder
getIterationState
in interface IterationStateHolder
public void setIterationState(Object stateObject)
IterationStateHolder
null
value. In the second case component should reset its state to the initial.setIterationState
in interface IterationStateHolder
stateObject
- request-scope component state or null
. Details are subject for a component implementationprotected void resetDataModel()
protected void resetChildState()
protected void preDecode(javax.faces.context.FacesContext context)
protected void preValidate(javax.faces.context.FacesContext context)
protected void preUpdate(javax.faces.context.FacesContext context)
protected void preEncodeBegin(javax.faces.context.FacesContext context)
public void markInitialState()
markInitialState
in interface javax.faces.component.PartialStateHolder
markInitialState
in class javax.faces.component.UIComponentBase
public void clearInitialState()
clearInitialState
in interface javax.faces.component.PartialStateHolder
clearInitialState
in class javax.faces.component.UIComponentBase
public Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.component.UIComponentBase
public void restoreState(javax.faces.context.FacesContext context, Object stateObject)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.component.UIComponentBase
public boolean invokeOnComponent(javax.faces.context.FacesContext context, String clientId, javax.faces.component.ContextCallback callback) throws javax.faces.FacesException
invokeOnComponent
in class javax.faces.component.UIComponentBase
javax.faces.FacesException
public boolean invokeOnRow(javax.faces.context.FacesContext context, String clientId, javax.faces.component.ContextCallback callback)
protected boolean visitFixedChildren(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback)
protected javax.faces.component.visit.VisitResult visitDataChildrenMetaComponents(ExtendedVisitContext extendedVisitContext, javax.faces.component.visit.VisitCallback callback)
protected boolean visitDataChildren(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback, boolean visitRows)
public boolean visitTree(javax.faces.component.visit.VisitContext visitContext, javax.faces.component.visit.VisitCallback callback)
visitTree
in class javax.faces.component.UIComponent
protected String extractKeySegment(javax.faces.context.FacesContext context, String substring)
context
- substring
- public void processEvent(javax.faces.event.ComponentSystemEvent event) throws javax.faces.event.AbortProcessingException
processEvent
in interface javax.faces.event.ComponentSystemEventListener
processEvent
in class javax.faces.component.UIComponent
javax.faces.event.AbortProcessingException
public void processEvent(javax.faces.event.SystemEvent event) throws javax.faces.event.AbortProcessingException
processEvent
in interface javax.faces.event.SystemEventListener
javax.faces.event.AbortProcessingException
public boolean isListenerForSource(Object source)
isListenerForSource
in interface javax.faces.event.SystemEventListener
protected DataComponentState getLocalComponentState()
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.