|
||||||||||
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
org.richfaces.component.UIDataAdaptor
public abstract class UIDataAdaptor
Base class for iterable components, like dataTable, Tomahawk dataList, Facelets repeat, tree etc., with support for partial rendering on AJAX responces for one or more selected iterations.
Nested Class Summary | |
---|---|
protected class |
UIDataAdaptor.ComponentVisitor
Base class for visit data model at phases decode, validation and update model |
Field Summary | |
---|---|
static java.lang.String |
COMPONENT_FAMILY
The standard component family for this component. |
static java.lang.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 |
Fields inherited from class javax.faces.component.UIComponent |
---|
BEANINFO_KEY, bindings, 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 | |
---|---|
UIDataAdaptor()
|
Method Summary | |
---|---|
void |
broadcast(javax.faces.event.FacesEvent event)
|
protected boolean |
broadcastLocal(javax.faces.event.FacesEvent event)
Process events targetted for concrete implementation. |
void |
captureOrigValue(javax.faces.context.FacesContext faces)
Save current state of data variable. |
void |
clearInitialState()
|
protected abstract org.ajax4jsf.model.DataComponentState |
createComponentState()
|
protected abstract org.ajax4jsf.model.ExtendedDataModel<?> |
createExtendedDataModel()
|
java.lang.String |
createUniqueId(javax.faces.context.FacesContext context,
java.lang.String seed)
|
protected java.util.Iterator<javax.faces.component.UIComponent> |
dataChildren()
|
void |
encodeAjaxChild(javax.faces.context.FacesContext context,
java.lang.String path,
java.util.Set<java.lang.String> ids,
java.util.Set<java.lang.String> renderedAreas)
|
protected java.lang.String |
extractKeySegment(javax.faces.context.FacesContext context,
java.lang.String substring)
|
protected java.util.Iterator<javax.faces.component.UIComponent> |
fixedChildren()
|
java.lang.String |
getClientId(javax.faces.context.FacesContext facesContext)
|
org.ajax4jsf.model.DataComponentState |
getComponentState()
|
protected org.ajax4jsf.model.ExtendedDataModel<?> |
getExtendedDataModel()
|
java.lang.String |
getFamily()
|
java.lang.Object |
getIterationState()
|
protected org.ajax4jsf.model.DataComponentState |
getLocalComponentState()
|
int |
getRowCount()
|
java.lang.Object |
getRowData()
|
java.lang.Object |
getRowKey()
|
javax.faces.convert.Converter |
getRowKeyConverter()
|
java.lang.String |
getRowKeyVar()
|
java.lang.String |
getStateVar()
|
java.lang.String |
getVar()
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getVariablesMap(javax.faces.context.FacesContext facesContext)
|
boolean |
invokeOnComponent(javax.faces.context.FacesContext context,
java.lang.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 |
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)
|
void |
processEvent(javax.faces.event.ComponentSystemEvent event)
|
void |
processUpdates(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,
java.lang.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)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
protected void |
setExtendedDataModel(org.ajax4jsf.model.ExtendedDataModel<?> extendedDataModel)
|
void |
setId(java.lang.String id)
|
void |
setIterationState(java.lang.Object stateObject)
|
void |
setKeepSaved(boolean keepSaved)
|
void |
setRowKey(javax.faces.context.FacesContext facesContext,
java.lang.Object rowKey)
Setup current row by key. |
void |
setRowKey(java.lang.Object rowKey)
|
void |
setRowKeyConverter(javax.faces.convert.Converter converter)
|
void |
setRowKeyVar(java.lang.String rowKeyVar)
|
void |
setStateVar(java.lang.String stateVar)
|
protected void |
setupVariable(javax.faces.context.FacesContext faces,
boolean rowSelected)
Setup EL variable for different iteration. |
void |
setValueExpression(java.lang.String name,
javax.el.ValueExpression binding)
|
void |
setVar(java.lang.String var)
|
protected boolean |
visitDataChildren(javax.faces.component.visit.VisitContext visitContext,
javax.faces.component.visit.VisitCallback callback,
boolean visitRows)
|
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,
org.ajax4jsf.model.DataVisitor visitor,
java.lang.Object argument)
Walk ( visit ) this component on all data-aware children for each row. |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
addClientBehavior, addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setParent, setRendered, setRendererType, setTransient, setValueBinding |
Methods inherited from class javax.faces.component.UIComponent |
---|
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, setInView, subscribeToEvent, unsubscribeFromEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COMPONENT_FAMILY
The standard component family for this component.
public static final java.lang.String COMPONENT_TYPE
The standard component type for this component.
protected UIDataAdaptor.ComponentVisitor decodeVisitor
protected UIDataAdaptor.ComponentVisitor validateVisitor
protected UIDataAdaptor.ComponentVisitor updateVisitor
Constructor Detail |
---|
public UIDataAdaptor()
Method Detail |
---|
protected java.util.Map<java.lang.String,java.lang.Object> getVariablesMap(javax.faces.context.FacesContext facesContext)
public java.lang.String getFamily()
getFamily
in class javax.faces.component.UIComponent
public void encodeAjaxChild(javax.faces.context.FacesContext context, java.lang.String path, java.util.Set<java.lang.String> ids, java.util.Set<java.lang.String> renderedAreas) throws java.io.IOException
java.io.IOException
public java.lang.String createUniqueId(javax.faces.context.FacesContext context, java.lang.String seed)
createUniqueId
in interface javax.faces.component.UniqueIdVendor
public java.lang.Object getRowKey()
public void setRowKey(javax.faces.context.FacesContext facesContext, java.lang.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.
faces
- -
current FacesContextkey
- new key value.protected void saveChildState(javax.faces.context.FacesContext facesContext)
EditableValueHolder
fields before change current
row.
faces
- protected void saveChildState(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
facesContext
- next
- childState
- protected java.util.Iterator<javax.faces.component.UIComponent> dataChildren()
protected java.util.Iterator<javax.faces.component.UIComponent> fixedChildren()
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
- next
- childState
- public void setRowKey(java.lang.Object rowKey)
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 boolean broadcastLocal(javax.faces.event.FacesEvent event)
broadcast(FacesEvent)
event
- -
processed event.
protected org.ajax4jsf.model.ExtendedDataModel<?> getExtendedDataModel()
protected abstract org.ajax4jsf.model.ExtendedDataModel<?> createExtendedDataModel()
protected void setExtendedDataModel(org.ajax4jsf.model.ExtendedDataModel<?> extendedDataModel)
extendedDataModel
- the extendedDataModel to setpublic java.lang.String getVar()
public void setVar(java.lang.String var)
public java.lang.String getRowKeyVar()
public void setRowKeyVar(java.lang.String rowKeyVar)
public java.lang.String getStateVar()
public void setStateVar(java.lang.String stateVar)
public int getRowCount()
public java.lang.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 contextlocalModel
- rowSelected
- public org.ajax4jsf.model.DataComponentState getComponentState()
protected abstract org.ajax4jsf.model.DataComponentState createComponentState()
public javax.faces.convert.Converter getRowKeyConverter()
public void setRowKeyConverter(javax.faces.convert.Converter converter)
public java.lang.String getClientId(javax.faces.context.FacesContext facesContext)
getClientId
in class javax.faces.component.UIComponentBase
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(java.lang.String name, javax.el.ValueExpression binding)
setValueExpression
in class javax.faces.component.UIComponent
protected boolean keepSaved(javax.faces.context.FacesContext context)
context
-
protected void iterate(javax.faces.context.FacesContext faces, UIDataAdaptor.ComponentVisitor visitor)
faces
- visitor
- public void walk(javax.faces.context.FacesContext faces, org.ajax4jsf.model.DataVisitor visitor, java.lang.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
public void setId(java.lang.String id)
setId
in class javax.faces.component.UIComponentBase
public java.lang.Object getIterationState()
getIterationState
in interface org.ajax4jsf.component.IterationStateHolder
public void setIterationState(java.lang.Object stateObject)
setIterationState
in interface org.ajax4jsf.component.IterationStateHolder
protected 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 java.lang.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, java.lang.Object stateObject)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.component.UIComponentBase
public boolean invokeOnComponent(javax.faces.context.FacesContext context, java.lang.String clientId, javax.faces.component.ContextCallback callback) throws javax.faces.FacesException
invokeOnComponent
in class javax.faces.component.UIComponentBase
javax.faces.FacesException
protected boolean visitFixedChildren(javax.faces.component.visit.VisitContext visitContext, 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 java.lang.String extractKeySegment(javax.faces.context.FacesContext context, java.lang.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
protected org.ajax4jsf.model.DataComponentState getLocalComponentState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |