Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-03


oracle.adf.view.faces.bi.component.pivotTable
Class UIGrid

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by org.apache.myfaces.trinidad.component.UIXComponent
          extended by org.apache.myfaces.trinidad.component.UIXComponentBase
              extended by oracle.adf.view.faces.bi.component.pivotTable.UIGrid

All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder
Direct Known Subclasses:
UIPivotTable

public abstract class UIGrid
extends org.apache.myfaces.trinidad.component.UIXComponentBase
implements javax.faces.component.NamingContainer
Since:
release specific (what release of product did this appear in)

Nested Class Summary
protected static class UIGrid.DefaultClientKeyManager
           
static class UIGrid.NullCellKey
           

 

Field Summary
static org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE
           
static org.apache.myfaces.trinidad.bean.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 UIGrid()
           
protected UIGrid(java.lang.String rendererType)
           

 

Method Summary
 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 UIGrid.DefaultClientKeyManager 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 index of the current cell.
 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)
           
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)
           

 

Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, createFacesBean, decode, decodeChildren, encodeAll, encodeChildren, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBeanType, getBooleanProperty, getChildCount, getChildren, getClientId, getContainerClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getFamily, getId, getIntProperty, getLifecycleRenderer, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnChildrenComponents, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processRestoreState, processUpdates, processValidators, removeAttributeChangeListener, removeFacesListener, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, setValueExpression, toString, updateChildren, validateChildren

 

Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponent
addPartialTarget, encodeFlattenedChild, encodeFlattenedChildren, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setUpEncodingContext, setupVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitTree, visitTree

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

TYPE

public static final org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE

VAR_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey VAR_KEY

Constructor Detail

UIGrid

protected UIGrid(java.lang.String rendererType)

UIGrid

protected UIGrid()

Method Detail

getVar

public final java.lang.String getVar()
Gets the name of the EL variable used to reference each element of this grid. Once this component has completed rendering, this variable is removed (or reverted back to its previous value).

setVar

public final void setVar(java.lang.String var)
Sets the name of the EL variable used to reference each element of this grid. Once this component has completed rendering, this variable is removed (or reverted back to its previous value).

queueEvent

public void queueEvent(javax.faces.event.FacesEvent event)
Queues an event. If there is a currency set on this grid, then the event will be wrapped so that when it is finally delivered, the correct currency will be restored.
Overrides:
queueEvent in class org.apache.myfaces.trinidad.component.UIXComponentBase
Parameters:
event - a FacesEvent

isPivotTableEvent

public boolean isPivotTableEvent(javax.faces.event.FacesEvent event)

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Delivers a wrapped event to the appropriate component. If the event is a special wrapped event, it is unwrapped.
Overrides:
broadcast in class org.apache.myfaces.trinidad.component.UIXComponentBase
Parameters:
event - a FacesEvent
Throws:
javax.faces.event.AbortProcessingException

processDecodes

public final void processDecodes(javax.faces.context.FacesContext context)
Decodes this component before decoding the facets. Decodes the children as many times as they are stamped.
Overrides:
processDecodes in class org.apache.myfaces.trinidad.component.UIXComponentBase
Parameters:
context - the FacesContext

decodeChildrenImpl

protected void decodeChildrenImpl(javax.faces.context.FacesContext context)
Overrides:
decodeChildrenImpl in class org.apache.myfaces.trinidad.component.UIXComponentBase

validateChildrenImpl

protected void validateChildrenImpl(javax.faces.context.FacesContext context)
Overrides:
validateChildrenImpl in class org.apache.myfaces.trinidad.component.UIXComponentBase

updateChildrenImpl

protected void updateChildrenImpl(javax.faces.context.FacesContext context)
Overrides:
updateChildrenImpl in class org.apache.myfaces.trinidad.component.UIXComponentBase

resetStampState

public void resetStampState()
Resets this component's stamps to their uninitialized state. It 'clears' cells inside _stampState before setting _stampState reference to null

processSaveState

public java.lang.Object processSaveState(javax.faces.context.FacesContext context)
Overrides:
processSaveState in class org.apache.myfaces.trinidad.component.UIXComponentBase

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class org.apache.myfaces.trinidad.component.UIXComponentBase

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class org.apache.myfaces.trinidad.component.UIXComponentBase

isCellAvailable

public final boolean isCellAvailable()
Checks to see if the current cell is available. This is useful when the total number of cells is not known.
Returns:
true iff the current cell is available.

getRowCount

public final int getRowCount()
Gets the total number of rows in this pivot table.
Returns:
-1 if the total number is not known.

getColumnCount

public final int getColumnCount()
Gets the total number of columns in this pivot table.
Returns:
-1 if the total number is not known.

getCellIndex

public final CellIndex getCellIndex()
Gets the index of the current cell.
Returns:
-1 if the current cell is unavailable.

getCellKey

public final CellKey getCellKey()
Gets the CellKey of the current cell.
Returns:
null if the current cell is unavailable.

getCellData

public java.lang.Object getCellData()
Gets the data for the current cell.
Returns:
null if the current cell is unavailable

isCellAvailable

public boolean isCellAvailable(CellIndex cellIndex)
Checks to see if the cell at the given index is available.
Parameters:
cellIndex - the index of the cell to check.
Returns:
true if data for the cell exists.

getCellData

public java.lang.Object getCellData(CellIndex cellIndex)
Gets the data at the given index.
Parameters:
cellIndex - the index of the cell to get data from.
Returns:
the data for the given cell.

getVarStatus

public abstract java.lang.String getVarStatus()
Gets the EL variable name to use to expose the varStatusMap.
See Also:
createVarStatusMap()

setCellKey

public void setCellKey(CellKey cellKey)
Makes a cell current. This method calls preCellDataChange() and postCellDataChange() as appropriate.
Parameters:
cellKey - The cellKey of the cell that should be made current. Use null to clear the current cell.
See Also:
DataModel.setCellKey(oracle.adf.view.faces.bi.model.CellKey)

setCellIndex

public void setCellIndex(CellIndex cellIndex)
Makes a cell current. This method calls preCellDataChange() and postCellDataChange() as appropriate.
Parameters:
cellIndex - The cellIndex of the cell that should be made current. Use null to clear the current cell.
See Also:
DataModel.setCellIndex(oracle.adf.view.faces.bi.model.CellIndex)

clearCurrencyStringCache

@Deprecated
protected void clearCurrencyStringCache()
Deprecated. Have your Renderer implement ClientRowKeyManagerFactory and create your own UIGrid.DefaultClientKeyManager 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.
Clear the cellKey-to-currencyString cache. The cache is not cleared immediately; instead it will be cleared when encodeBegin(javax.faces.context.FacesContext) is called.

encodeBegin

public final void encodeBegin(javax.faces.context.FacesContext context)
                       throws java.io.IOException
Clears all the currency strings.
Overrides:
encodeBegin in class org.apache.myfaces.trinidad.component.UIXComponentBase
Throws:
java.io.IOException

encodeEnd

public void encodeEnd(javax.faces.context.FacesContext context)
               throws java.io.IOException
Overrides:
encodeEnd in class org.apache.myfaces.trinidad.component.UIXComponentBase
Throws:
java.io.IOException

getClientCellKey

public java.lang.String getClientCellKey()
Gets a String version of the current cellkey. The contents of the String are controlled by the current UIGrid.DefaultClientKeyManager. 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.
See Also:
setClientCellKey(java.lang.String), getClientKeyManager(), UIGrid.DefaultClientKeyManager.getClientCellKey(javax.faces.context.FacesContext, javax.faces.component.UIComponent, oracle.adf.view.faces.bi.model.CellKey)

setClientCellKey

public void setClientCellKey(java.lang.String clientCellKey)
Restores this component's cellData to be what it was when the given client cellKey string was created.
See Also:
getClientCellKey()

getContainerClientId

public final java.lang.String getContainerClientId(javax.faces.context.FacesContext context)
For internal use only. Gets the client-id of this component, without any NamingContainers. This id changes depending on the currency Object. Because this implementation uses currency strings, the local client ID is not stable for very long. Its lifetime is the same as that of a currency string.
Overrides:
getContainerClientId in class javax.faces.component.UIComponent
Returns:
the local clientId
See Also:
getClientCellKey()

preCellDataChange

protected final void preCellDataChange()
Prepares this component for a change in the cellData. This method should be called right before the cellData changes. It saves the internal states of all the stamps of this component so that they can be restored when the cellData is reverted.

postCellDataChange

protected void postCellDataChange()
Sets up this component to use the new cellData. This method should be called right after the cellData changes. It sets up the var EL variable to be the current cellData. It also sets up the internal states of all the stamps of this component to match this new cellData.

getStamps

protected abstract java.util.List<javax.faces.component.UIComponent> getStamps()
Gets the UIComponents that are considered stamps. This implementation simply returns the children of this component.
Returns:
each element must be of type UIComponent.

saveStampState

protected java.lang.Object saveStampState(javax.faces.context.FacesContext context,
                                          javax.faces.component.UIComponent stamp)
Saves the state of a stamp. This method is called when the currency of this component is changed so that the state of this stamp can be preserved, before the stamp is updated with the state corresponding to the new currency. This method recurses for the children and facets of the stamp.
Returns:
this object must be Serializable if client-side state saving is used.

restoreStampState

protected void restoreStampState(javax.faces.context.FacesContext context,
                                 javax.faces.component.UIComponent stamp,
                                 java.lang.Object stampState)
Restores the state of a stamp. This method is called after the currency of this component is changed so that the state of this stamp can be changed to match the new currency. This method recurses for the children and facets of the stamp.

processComponent

protected final void processComponent(javax.faces.context.FacesContext context,
                                      javax.faces.component.UIComponent component,
                                      javax.faces.event.PhaseId phaseId)
Process a component. This method calls processDecodes(javax.faces.context.FacesContext), UIXComponentBase.processValidators(javax.faces.context.FacesContext) or UIXComponentBase.processUpdates(javax.faces.context.FacesContext) depending on the {#link PhaseId}.

processFacetsAndChildren

protected abstract void processFacetsAndChildren(javax.faces.context.FacesContext context,
                                                 javax.faces.event.PhaseId phaseId)
Process this component's facets and children. This method should call 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.

getDataModel

public final DataModel getDataModel()
Gets the DataModel to use with this component.

resetClientKeyManager

public void resetClientKeyManager()
Resets the ClientKeyManager.

getClientKeyManager

public final ClientKeyManager getClientKeyManager()
Gets the 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.

invokeOnComponent

public boolean invokeOnComponent(javax.faces.context.FacesContext context,
                                 java.lang.String clientId,
                                 javax.faces.component.ContextCallback callback)
                          throws javax.faces.FacesException
Overrides:
invokeOnComponent in class org.apache.myfaces.trinidad.component.UIXComponentBase
Throws:
javax.faces.FacesException

getDataModel

protected final DataModel getDataModel(boolean createIfNull)
Gets the DataModel to use with this component.
Parameters:
createIfNull - creates the data model if necessary

createDataModel

protected abstract DataModel createDataModel(DataModel current,
                                             java.lang.Object value)
Creates the DataModel to use with this component.
Parameters:
current - the current DataModel, or null if there is none.
value - this is the value returned from getValue()

getValue

protected abstract java.lang.Object getValue()
Gets the value that must be converted into a DataModel

createVarStatusMap

protected java.util.Map<java.lang.String,java.lang.Object> createVarStatusMap()
Gets the Map to use as the "varStatus". This implementation supports the following keys:

cleanInternalState

protected void cleanInternalState(java.util.Set<java.lang.String> stringCellKey)
Used by child components (eg. UIPivotTable) to clean up _stampState based on the cellKeyList from the client
Parameters:
stringCellKey -

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-03


Copyright © 1997, 2009, Oracle. All rights reserved.