public abstract class UIGrid
extends org.apache.myfaces.trinidad.component.UIXComponentBase
implements javax.faces.component.NamingContainer
UIPivotTable.| Modifier and Type | Class and Description |
|---|---|
protected static class |
UIGrid.DefaultClientKeyManager |
static class |
UIGrid.NullCellKey
Internal use only.
|
| Modifier and Type | Field and Description |
|---|---|
static org.apache.myfaces.trinidad.bean.FacesBean.Type |
TYPE |
static org.apache.myfaces.trinidad.bean.PropertyKey |
VAR_KEY |
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY| Modifier | Constructor and Description |
|---|---|
protected |
UIGrid() |
protected |
UIGrid(java.lang.String rendererType) |
| Modifier and Type | Method and Description |
|---|---|
void |
broadcast(javax.faces.event.FacesEvent event)
Delivers a wrapped event to the appropriate component.
|
protected void |
cleanInternalState(java.util.Set<java.lang.String> stringCellKey)
Used by child components (eg.
|
protected void |
clearCurrencyStringCache()
Deprecated.
Have your Renderer implement
ClientRowKeyManagerFactory
and create your own ClientKeyManager instances. Then you can
manage the lifecycle of each key inside your ClientRowKeyManager.
TODO - Need to figure out when to clear the entire key cache
( probably during events where the pt is refreshed completely )
TODO - As a further optimization, need to figure out when to prune the client key cache based on blocks.
The table collects the keys from the client and sends them to the server to be pruned.
TODO - Need to determine if the cache needs to be maintained for the selection state / stamp state to function. |
protected abstract DataModel |
createDataModel(DataModel current,
java.lang.Object value)
Creates the
DataModel 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) |
void |
encodeBegin(javax.faces.context.FacesContext context)
Clears all the currency strings.
|
void |
encodeEnd(javax.faces.context.FacesContext context) |
java.lang.Object |
getCellData()
Gets the data for the current cell.
|
java.lang.Object |
getCellData(CellIndex cellIndex)
Gets the data at the given index.
|
CellIndex |
getCellIndex()
Gets the cell index of the current cell, or
null if currency has not been established. |
CellKey |
getCellKey()
Gets the CellKey of the current cell.
|
java.lang.String |
getClientCellKey()
Gets a
String version of the current cellkey. |
ClientKeyManager |
getClientKeyManager()
Gets the
ClientKeyManager that is used to handle the
getClientCellKey() and
setClientCellKey(java.lang.String) methods. |
int |
getColumnCount()
Gets the total number of columns in this pivot table.
|
java.lang.String |
getContainerClientId(javax.faces.context.FacesContext context)
For internal use only.
|
DataModel |
getDataModel()
Gets the
DataModel to use with this component. |
protected DataModel |
getDataModel(boolean createIfNull)
Gets the
DataModel to use with this component. |
int |
getRowCount()
Gets the total number of rows in this pivot table.
|
protected abstract 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
DataModel. |
java.lang.String |
getVar()
Gets the name of the EL variable used to reference each element of
this grid.
|
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 |
isCellAvailable()
Checks to see if the current cell is available.
|
boolean |
isCellAvailable(CellIndex cellIndex)
Checks to see if the cell at the given index is available.
|
boolean |
isPivotTableEvent(javax.faces.event.FacesEvent event)
Indicates whether the specified event is a Pivot Table event,
e.g.
|
protected void |
postCellDataChange()
Sets up this component to use the new cellData.
|
protected void |
preCellDataChange()
Prepares this component for a change in the cellData.
|
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 |
resetClientKeyManager()
Resets the ClientKeyManager.
|
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 |
setCellIndex(CellIndex cellIndex)
Makes a cell current.
|
void |
setCellKey(CellKey cellKey)
Makes a cell current.
|
void |
setClientCellKey(java.lang.String clientCellKey)
Restores this component's cellData to be what it was when the given
client cellKey string was created.
|
void |
setVar(java.lang.String var)
Sets the name of the EL variable used to reference each element of
this grid.
|
protected void |
updateChildrenImpl(javax.faces.context.FacesContext context) |
protected void |
validateChildrenImpl(javax.faces.context.FacesContext context) |
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addClientBehavior, addComponentChange, addComponentChange, addComponentChangeFilter, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, clearCachedClientIds, clearInitialState, createFacesBean, decode, decodeChildren, encodeChildren, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBeanType, getBooleanProperty, getChildCount, getChildren, getClientBehaviors, getClientId, getComponentChangeFilters, getContainerClientId, getDefaultEventName, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getFamily, getId, getIntProperty, getLifecycleRenderer, getListenersForEventClass, getParent, getPassThroughAttributes, getProperty, getPropertyKey, getRenderedFacetsAndChildren, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, initialStateMarked, invokeOnChildrenComponents, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processRestoreState, processUpdates, processValidators, removeAttributeChangeListener, removeComponentChangeFilter, removeFacesListener, satisfiesPartialTrigger, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setupFlattenedChildrenContext, setupFlattenedContext, setValueBinding, setValueExpression, subscribeToEvent, tearDownFlattenedChildrenContext, tearDownFlattenedContext, toString, unsubscribeFromEvent, updateChildren, validateChildrenaddPartialTarget, broadcastInContext, clearCachedClientIds, defaultGetRenderedFacetsAndChildren, encodeFlattenedChild, encodeFlattenedChildren, getLogicalParent, getLogicalParent, getStateHelper, getStateHelper, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setupChildrenEncodingContext, setupChildrenVisitingContext, setupEncodingContext, setUpEncodingContext, setupVisitingContext, tearDownChildrenEncodingContext, tearDownChildrenVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitAllChildren, visitChildren, visitChildren, visitTree, visitTreeencodeAll, getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getTransientStateHelper, getTransientStateHelper, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInViewpublic static final org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE
public static final org.apache.myfaces.trinidad.bean.PropertyKey VAR_KEY
public final java.lang.String getVar()
public final void setVar(java.lang.String var)
var - the name of the "var" EL variablepublic void queueEvent(javax.faces.event.FacesEvent event)
queueEvent in class org.apache.myfaces.trinidad.component.UIXComponentBaseevent - a FacesEventpublic boolean isPivotTableEvent(javax.faces.event.FacesEvent event)
DrillEvent, PivotEvent, or SortEvent.event - the event to checktrue if event is a pivot table event; false otherwisepublic void broadcast(javax.faces.event.FacesEvent event)
throws javax.faces.event.AbortProcessingException
broadcast in class org.apache.myfaces.trinidad.component.UIXComponentBaseevent - a FacesEventjavax.faces.event.AbortProcessingExceptionpublic final void processDecodes(javax.faces.context.FacesContext context)
processDecodes in class org.apache.myfaces.trinidad.component.UIXComponentBasecontext - the FacesContextprotected void decodeChildrenImpl(javax.faces.context.FacesContext context)
decodeChildrenImpl in class org.apache.myfaces.trinidad.component.UIXComponentBaseprotected void validateChildrenImpl(javax.faces.context.FacesContext context)
validateChildrenImpl in class org.apache.myfaces.trinidad.component.UIXComponentBaseprotected void updateChildrenImpl(javax.faces.context.FacesContext context)
updateChildrenImpl in class org.apache.myfaces.trinidad.component.UIXComponentBasepublic void resetStampState()
public java.lang.Object processSaveState(javax.faces.context.FacesContext context)
processSaveState in class org.apache.myfaces.trinidad.component.UIXComponentBasepublic java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class org.apache.myfaces.trinidad.component.UIXComponentBasepublic void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class org.apache.myfaces.trinidad.component.UIXComponentBasepublic final boolean isCellAvailable()
true if the current cell is available; false otherwisepublic final int getRowCount()
public final int getColumnCount()
public final CellIndex getCellIndex()
null if currency has not been established.public final CellKey getCellKey()
public java.lang.Object getCellData()
public boolean isCellAvailable(CellIndex cellIndex)
cellIndex - the index of the cell to check.public java.lang.Object getCellData(CellIndex cellIndex)
cellIndex - the index of the cell to get data from.public abstract java.lang.String getVarStatus()
createVarStatusMap()public void setCellKey(CellKey cellKey)
preCellDataChange() and
postCellDataChange() as appropriate.cellKey - The cellKey of the cell that should be made current. Use null
to clear the current cell.DataModel.setCellKey(oracle.adf.view.faces.bi.model.CellKey)public void setCellIndex(CellIndex cellIndex)
preCellDataChange() and
postCellDataChange() as appropriate.cellIndex - The cellIndex of the cell that should be made current. Use null
to clear the current cell.DataModel.setCellIndex(oracle.adf.view.faces.bi.model.CellIndex)@Deprecated protected void clearCurrencyStringCache()
ClientRowKeyManagerFactory
and create your own ClientKeyManager instances. Then you can
manage the lifecycle of each key inside your ClientRowKeyManager.
TODO - Need to figure out when to clear the entire key cache
( probably during events where the pt is refreshed completely )
TODO - As a further optimization, need to figure out when to prune the client key cache based on blocks.
The table collects the keys from the client and sends them to the server to be pruned.
TODO - Need to determine if the cache needs to be maintained for the selection state / stamp state to function.encodeBegin(javax.faces.context.FacesContext) is called.public final void encodeBegin(javax.faces.context.FacesContext context)
throws java.io.IOException
encodeBegin in class org.apache.myfaces.trinidad.component.UIXComponentBasejava.io.IOExceptionpublic void encodeEnd(javax.faces.context.FacesContext context)
throws java.io.IOException
encodeEnd in class org.apache.myfaces.trinidad.component.UIXComponentBasejava.io.IOExceptionpublic java.lang.String getClientCellKey()
String version of the current cellkey.
The contents of the String are controlled by the current
ClientKeyManager.
This String can be passed into the setClientCellKey(java.lang.String)method
to restore the current cellData.
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.String version of the current cellkeysetClientCellKey(java.lang.String),
getClientKeyManager(),
ClientKeyManager.getClientCellKey(javax.faces.context.FacesContext, javax.faces.component.UIComponent, oracle.adf.view.faces.bi.model.CellKey)public void setClientCellKey(java.lang.String clientCellKey)
clientCellKey - a String version of the cellkeygetClientCellKey()public final java.lang.String getContainerClientId(javax.faces.context.FacesContext context)
getContainerClientId in class javax.faces.component.UIComponentgetClientCellKey()protected final void preCellDataChange()
protected void postCellDataChange()
protected abstract 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)
context - the Faces Contextstamp - the component whose state should be restoredstampState - the stamp stateprotected 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}.context - the Faces Contextcomponent - the component to processphaseId - the phase IDprotected 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.context - the Faces ContextphaseId - the phase IDpublic final DataModel getDataModel()
DataModel to use with this component.DataModel to use with this componentpublic void resetClientKeyManager()
public final ClientKeyManager getClientKeyManager()
ClientKeyManager that is used to handle the
getClientCellKey() and
setClientCellKey(java.lang.String) methods.
If the manager does not already exist, a new one is created.ClientKeyManagerpublic boolean invokeOnComponent(javax.faces.context.FacesContext context,
java.lang.String clientId,
javax.faces.component.ContextCallback callback)
throws javax.faces.FacesException
invokeOnComponent in class org.apache.myfaces.trinidad.component.UIXComponentBasejavax.faces.FacesExceptionprotected final DataModel getDataModel(boolean createIfNull)
DataModel to use with this component.createIfNull - whether to create the data model if necessaryDataModel to use with this componentprotected abstract DataModel createDataModel(DataModel current, java.lang.Object value)
DataModel to use with this component.current - the current DataModel, or null if there is none.value - this is the value returned from getValue()DataModelprotected abstract java.lang.Object getValue()
DataModel.DataModelprotected java.util.Map<java.lang.String,java.lang.Object> createVarStatusMap()
Map to use as the "varStatus".
This implementation supports the following keys:Map to use as the "varStatus"protected void cleanInternalState(java.util.Set<java.lang.String> stringCellKey)
stringCellKey -