|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
org.apache.myfaces.trinidad.component.UIXComponent
org.apache.myfaces.trinidad.component.UIXComponentBase
org.apache.myfaces.trinidad.component.UIXCollection
public abstract class UIXCollection
Base class for components that do stamping. This class set the EL 'var' variable correctly when the rowData changes. And it wraps events that are queued, so that the correct rowData can be restored on this component when the event is broadcast.
Field Summary | |
---|---|
static FacesBean.Type |
TYPE
|
static PropertyKey |
VAR_KEY
|
Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase |
---|
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY |
Fields inherited from class javax.faces.component.UIComponent |
---|
bindings |
Fields inherited from interface javax.faces.component.NamingContainer |
---|
SEPARATOR_CHAR |
Constructor Summary | |
---|---|
protected |
UIXCollection()
|
protected |
UIXCollection(java.lang.String rendererType)
|
Method Summary | |
---|---|
void |
broadcast(javax.faces.event.FacesEvent event)
Delivers a wrapped event to the appropriate component. |
protected void |
clearCurrencyStringCache()
Deprecated. Have your Renderer implement ClientRowKeyManagerFactory
and create your own ClientRowKeyManager instances. Then you can
manage the lifecycle of each key inside your ClientRowKeyManager. |
protected abstract CollectionModel |
createCollectionModel(CollectionModel current,
java.lang.Object value)
Creates the CollectionModel to use with this component. |
protected java.util.Map<java.lang.String,java.lang.Object> |
createVarStatusMap()
Gets the Map to use as the "varStatus". |
protected void |
decodeChildrenImpl(javax.faces.context.FacesContext context)
Calls processDecodes on all facets and children of this component. |
void |
encodeBegin(javax.faces.context.FacesContext context)
Clears all the currency strings. |
void |
encodeEnd(javax.faces.context.FacesContext context)
|
java.lang.String |
getClientRowKey()
Gets a String version of the current rowkey. |
ClientRowKeyManager |
getClientRowKeyManager()
Gets the ClientRowKeyManager that is used to handle the getClientRowKey() and
setClientRowKey(java.lang.String) methods. |
protected CollectionModel |
getCollectionModel()
Gets the CollectionModel to use with this component. |
protected CollectionModel |
getCollectionModel(boolean createIfNull)
Gets the CollectionModel to use with this component. |
java.lang.String |
getContainerClientId(javax.faces.context.FacesContext context)
Gets the client-id of this component, without any NamingContainers. |
java.lang.String |
getCurrencyString()
Deprecated. use getClientRowKey |
int |
getRowCount()
Gets the total number of rows in this table. |
java.lang.Object |
getRowData()
Gets the data for the current row. |
java.lang.Object |
getRowData(int rowIndex)
Gets the rowData at the given index. |
int |
getRowIndex()
Gets the index of the current row. |
java.lang.Object |
getRowKey()
Gets the rowKey of the current row. |
java.util.List<SortCriterion> |
getSortCriteria()
Gets the criteria that this collection is sorted by. |
protected java.util.List<javax.faces.component.UIComponent> |
getStamps()
Gets the UIComponents that are considered stamps. |
protected abstract java.lang.Object |
getValue()
Gets the value that must be converted into a CollectionModel |
java.lang.String |
getVar()
Gets the name of the EL variable used to reference each element of this collection. |
abstract java.lang.String |
getVarStatus()
Gets the EL variable name to use to expose the varStatusMap. |
boolean |
invokeOnComponent(javax.faces.context.FacesContext context,
java.lang.String clientId,
javax.faces.component.ContextCallback callback)
|
boolean |
isRowAvailable()
Checks to see if the current row is available. |
boolean |
isRowAvailable(int rowIndex)
Checks to see if the row at the given index is available. |
boolean |
isSortable(java.lang.String property)
|
protected void |
postRowDataChange()
Sets up this component to use the new rowData. |
protected void |
preRowDataChange()
Prepares this component for a change in the rowData. |
protected void |
processComponent(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.event.PhaseId phaseId)
Process a component. |
void |
processDecodes(javax.faces.context.FacesContext context)
Decodes this component before decoding the facets. |
protected abstract void |
processFacetsAndChildren(javax.faces.context.FacesContext context,
javax.faces.event.PhaseId phaseId)
Process this component's facets and children. |
java.lang.Object |
processSaveState(javax.faces.context.FacesContext context)
|
void |
queueEvent(javax.faces.event.FacesEvent event)
Queues an event. |
void |
resetStampState()
Resets this component's stamps to their uninitialized state. |
protected void |
restoreStampState(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent stamp,
java.lang.Object stampState)
Restores the state of a stamp. |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
protected java.lang.Object |
saveStampState(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent stamp)
Saves the state of a stamp. |
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setClientRowKey(java.lang.String clientRowKey)
Restores this component's rowData to be what it was when the given client rowKey string was created. |
void |
setCurrencyString(java.lang.String currency)
Deprecated. use setClientRowKey |
void |
setRowIndex(int rowIndex)
Makes a row current. |
void |
setRowKey(java.lang.Object rowKey)
Makes a row current. |
void |
setSortCriteria(java.util.List<SortCriterion> criteria)
Sorts this collection by the given criteria. |
void |
setVar(java.lang.String var)
Sets the name of the EL variable used to reference each element of this collection. |
protected void |
updateChildrenImpl(javax.faces.context.FacesContext context)
|
protected void |
validateChildrenImpl(javax.faces.context.FacesContext context)
Calls processValidators on all facets and children of this component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final FacesBean.Type TYPE
public static final PropertyKey VAR_KEY
Constructor Detail |
---|
protected UIXCollection(java.lang.String rendererType)
protected UIXCollection()
Method Detail |
---|
public final java.lang.String getVar()
public final void setVar(java.lang.String var)
public void queueEvent(javax.faces.event.FacesEvent event)
queueEvent
in class UIXComponentBase
event
- a FacesEventpublic void broadcast(javax.faces.event.FacesEvent event) throws javax.faces.event.AbortProcessingException
broadcast
in class UIXComponentBase
event
- a FacesEvent
javax.faces.event.AbortProcessingException
public final void processDecodes(javax.faces.context.FacesContext context)
processDecodes
in class UIXComponentBase
context
- the FacesContextprotected void decodeChildrenImpl(javax.faces.context.FacesContext context)
UIXComponentBase
decodeChildrenImpl
in class UIXComponentBase
context
- the current FacesContextprotected void validateChildrenImpl(javax.faces.context.FacesContext context)
UIXComponentBase
validateChildrenImpl
in class UIXComponentBase
context
- the current FacesContextprotected void updateChildrenImpl(javax.faces.context.FacesContext context)
updateChildrenImpl
in class UIXComponentBase
public void resetStampState()
public java.lang.Object processSaveState(javax.faces.context.FacesContext context)
processSaveState
in class UIXComponentBase
public java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class UIXComponentBase
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class UIXComponentBase
public final boolean isRowAvailable()
CollectionModel.isRowAvailable(int)
public final int getRowCount()
DataModel.getRowCount()
public final int getRowIndex()
DataModel.getRowIndex()
public final java.lang.Object getRowKey()
CollectionModel.getRowKey()
public final java.lang.Object getRowData()
CollectionModel.getRowData(int)
public boolean isRowAvailable(int rowIndex)
rowIndex
- the index of the row to check.
CollectionModel.isRowAvailable(int)
public java.lang.Object getRowData(int rowIndex)
rowIndex
- the index of the row to get data from.
CollectionModel.getRowData(int)
public abstract java.lang.String getVarStatus()
createVarStatusMap()
public void setRowKey(java.lang.Object rowKey)
preRowDataChange()
and
postRowDataChange()
as appropriate.
rowKey
- The rowKey of the row that should be made current. Use null
to clear the current row.CollectionModel.setRowKey(java.lang.Object)
public void setRowIndex(int rowIndex)
preRowDataChange()
and
postRowDataChange()
as appropriate.
rowIndex
- The rowIndex of the row that should be made current. Use -1
to clear the current row.DataModel.setRowIndex(int)
public final boolean isSortable(java.lang.String property)
property
- a property name in the model
CollectionModel.isSortable(java.lang.String)
public void setSortCriteria(java.util.List<SortCriterion> criteria)
criteria
- Each element in this List must be of type SortCriterion.SortCriterion
,
CollectionModel.setSortCriteria(java.util.List)
public final java.util.List<SortCriterion> getSortCriteria()
SortCriterion
,
CollectionModel.getSortCriteria()
@Deprecated protected void clearCurrencyStringCache()
ClientRowKeyManagerFactory
and create your own ClientRowKeyManager
instances. Then you can
manage the lifecycle of each key inside your ClientRowKeyManager.
encodeBegin(javax.faces.context.FacesContext)
is called.
public final void encodeBegin(javax.faces.context.FacesContext context) throws java.io.IOException
encodeBegin
in class UIXComponentBase
java.io.IOException
public void encodeEnd(javax.faces.context.FacesContext context) throws java.io.IOException
encodeEnd
in class UIXComponentBase
java.io.IOException
@Deprecated public java.lang.String getCurrencyString()
getClientRowKey()
@Deprecated public void setCurrencyString(java.lang.String currency)
setClientRowKey(java.lang.String)
public java.lang.String getClientRowKey()
ClientRowKeyManager
.
This String can be passed into the setClientRowKey(java.lang.String)
method
to restore the current rowData.
The lifetime of this String is short and it may not be valid during
future requests; however, it is guaranteed to be valid
for the next subsequent request.
setClientRowKey(java.lang.String)
,
getClientRowKeyManager()
,
ClientRowKeyManager.getClientRowKey(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
public void setClientRowKey(java.lang.String clientRowKey)
getClientRowKey()
public final java.lang.String getContainerClientId(javax.faces.context.FacesContext context)
getContainerClientId
in class javax.faces.component.UIComponent
getClientRowKey()
protected final void preRowDataChange()
protected final void postRowDataChange()
protected java.util.List<javax.faces.component.UIComponent> getStamps()
protected java.lang.Object saveStampState(javax.faces.context.FacesContext context, javax.faces.component.UIComponent stamp)
protected void restoreStampState(javax.faces.context.FacesContext context, javax.faces.component.UIComponent stamp, java.lang.Object stampState)
protected final void processComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.event.PhaseId phaseId)
processDecodes(javax.faces.context.FacesContext)
,
UIXComponentBase.processValidators(javax.faces.context.FacesContext)
or
UIXComponentBase.processUpdates(javax.faces.context.FacesContext)
depending on the {#link PhaseId}.
protected abstract void processFacetsAndChildren(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId)
processComponent(javax.faces.context.FacesContext, javax.faces.component.UIComponent, javax.faces.event.PhaseId)
as many times as necessary for each facet and child.
processComponent(javax.faces.context.FacesContext, javax.faces.component.UIComponent, javax.faces.event.PhaseId)
may be called repeatedly for the same child if that child is
being stamped.
protected final CollectionModel getCollectionModel()
public final ClientRowKeyManager getClientRowKeyManager()
getClientRowKey()
and
setClientRowKey(java.lang.String)
methods.
If the manager does not already exist a new one is created.
In order to create your own manager, your Renderer (for this component)
must implement
ClientRowKeyManagerFactory
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.UIComponent
javax.faces.FacesException
protected final CollectionModel getCollectionModel(boolean createIfNull)
createIfNull
- creates the collection model if necessaryprotected abstract CollectionModel createCollectionModel(CollectionModel current, java.lang.Object value)
current
- the current CollectionModel, or null if there is none.value
- this is the value returned from getValue()
protected abstract java.lang.Object getValue()
protected java.util.Map<java.lang.String,java.lang.Object> createVarStatusMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |