|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hivemind.impl.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.BaseComponent
org.apache.tapestry.contrib.table.components.TableView
A low level Table component that wraps all other low level Table components. This component
carries the ITableModel
that is used by the other
Table components. Please see the documentation of
ITableModel
if you need to know more about how a
table is represented.
This component also handles the saving of the state of the model using an
ITableSessionStateManager
to determine what part
of the model is to be saved and an
ITableSessionStoreManager
to determine how to
save it.
Upon the beginning of a new request cycle when the table model is first needed, the model is obtained using the following process:
ITableSessionStoreManager
is used to load the
persistent state.
ITableSessionStateManager
that could be supplied
using the tableSessionStateManager binding (but has a default value and is therefore not
required).
ITableSessionStateManager
returns
null, then a table model is taken from the tableModel binding. Thus, if the
NullTableSessionStateManager
is used, the
table model would be taken from the tableModel binding every time.
ITableSessionStateManager
.
ITableSessionStoreManager
is used to save the
persistent state. Use of the
ITableSessionStoreManager
is usually necessary
when tables with the same model have to be used across multiple pages, and hence the state has to
be saved in the Visit, rather than in a persistent component property.
Please see the Component Reference for details on how to use this component. [ Component Reference ]
Field Summary |
Fields inherited from interface org.apache.tapestry.contrib.table.model.ITableModelSource |
TABLE_MODEL_SOURCE_ATTRIBUTE |
Constructor Summary | |
TableView()
The component constructor. |
Method Summary | |
void |
fireObservedStateChange()
Invoked when there is a modification of the table state and it needs to be saved |
protected ITableColumnModel |
generateTableColumnModel(java.lang.String strDesc)
Generate a table column model out of the description string provided. |
protected ITableModel |
generateTableModel(SimpleTableState objState)
Generate a table model using the 'source' and 'columns' parameters. |
ITableModel |
getCachedTableModelValue()
|
abstract java.io.Serializable |
getClientAppState()
|
abstract java.io.Serializable |
getClientState()
|
abstract java.lang.Object |
getColumns()
|
abstract org.apache.tapestry.IComponent |
getColumnSettingsContainer()
|
abstract IAdvancedTableColumnSource |
getColumnSource()
|
ITableSessionStateManager |
getDefaultTableSessionStateManager()
The default session state manager to be used in case no such manager is provided by the corresponding parameter. |
abstract int |
getInitialPage()
|
abstract java.lang.String |
getInitialSortColumn()
|
abstract boolean |
getInitialSortOrder()
|
abstract TableColumnModelSource |
getModelSource()
|
abstract int |
getPageSize()
|
abstract java.lang.String |
getPersist()
|
abstract java.io.Serializable |
getSessionState()
|
abstract java.lang.Object |
getSource()
|
protected ITableColumnModel |
getTableColumnModel()
Returns the table column model as specified by the 'columns' binding. |
ITableModel |
getTableModel()
Returns the tableModel. |
abstract ITableModel |
getTableModelValue()
|
abstract ITableSessionStateManager |
getTableSessionStateManager()
|
abstract ITableSessionStoreManager |
getTableSessionStoreManager()
|
protected java.io.Serializable |
loadSessionState()
Loads the table state using the SessionStoreManager. |
void |
pageBeginRender(org.apache.tapestry.event.PageEvent event)
Ensures that the table state is saved before the render phase begins in case there are modifications for which fireObservedStateChange() has not been invoked. |
void |
pageDetached(org.apache.tapestry.event.PageEvent objEvent)
Invokes the component member initializations. |
protected void |
renderComponent(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IRequestCycle cycle)
Stores a pointer to this component in the Request Cycle while rendering so that wrapped components have access to it. |
void |
reset()
Resets the table by removing any stored table state. |
protected void |
saveSessionState()
Saves the table state using the SessionStateManager to determine what to save and the SessionStoreManager to determine where to save it. |
abstract void |
setClientAppState(java.io.Serializable sessionState)
|
abstract void |
setClientState(java.io.Serializable sessionState)
|
abstract void |
setSessionState(java.io.Serializable sessionState)
|
protected void |
storeSessionState(java.io.Serializable objState)
Stores the table state using the SessionStoreManager. |
protected void |
validateValues()
Make sure that the values stored in the model are useable and correct. |
Methods inherited from class org.apache.tapestry.BaseComponent |
addOuter, finishLoad |
Methods inherited from class org.apache.tapestry.AbstractComponent |
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString |
Methods inherited from class org.apache.hivemind.impl.BaseLocatable |
getLocation, setLocation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.tapestry.IComponent |
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty |
Methods inherited from interface org.apache.tapestry.IRender |
render |
Methods inherited from interface org.apache.hivemind.LocationHolder |
setLocation |
Methods inherited from interface org.apache.hivemind.Locatable |
getLocation |
Constructor Detail |
public TableView()
Method Detail |
public abstract TableColumnModelSource getModelSource()
public abstract IAdvancedTableColumnSource getColumnSource()
public abstract ITableModel getTableModelValue()
public abstract java.lang.Object getSource()
public abstract java.lang.Object getColumns()
public abstract int getInitialPage()
public abstract java.lang.String getInitialSortColumn()
public abstract boolean getInitialSortOrder()
public abstract ITableSessionStateManager getTableSessionStateManager()
public abstract ITableSessionStoreManager getTableSessionStoreManager()
public abstract org.apache.tapestry.IComponent getColumnSettingsContainer()
public abstract int getPageSize()
public abstract java.lang.String getPersist()
public abstract java.io.Serializable getSessionState()
public abstract void setSessionState(java.io.Serializable sessionState)
public abstract java.io.Serializable getClientState()
public abstract void setClientState(java.io.Serializable sessionState)
public abstract java.io.Serializable getClientAppState()
public abstract void setClientAppState(java.io.Serializable sessionState)
public void pageDetached(org.apache.tapestry.event.PageEvent objEvent)
pageDetached
in interface org.apache.tapestry.event.PageDetachListener
PageDetachListener.pageDetached(PageEvent)
public void reset()
public ITableModel getCachedTableModelValue()
public ITableModel getTableModel()
getTableModel
in interface ITableModelSource
protected ITableModel generateTableModel(SimpleTableState objState)
protected ITableColumnModel getTableColumnModel()
protected ITableColumnModel generateTableColumnModel(java.lang.String strDesc)
strDesc
- the description of the column model to be generated
public ITableSessionStateManager getDefaultTableSessionStateManager()
public void fireObservedStateChange()
fireObservedStateChange
in interface ITableModelSource
ITableModelSource.fireObservedStateChange()
public void pageBeginRender(org.apache.tapestry.event.PageEvent event)
fireObservedStateChange()
has not been invoked.
pageBeginRender
in interface org.apache.tapestry.event.PageBeginRenderListener
PageBeginRenderListener.pageBeginRender(org.apache.tapestry.event.PageEvent)
protected void saveSessionState()
protected java.io.Serializable loadSessionState()
protected void storeSessionState(java.io.Serializable objState)
objState
- the table state to storeprotected void validateValues()
protected void renderComponent(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle)
BaseComponent.renderComponent(IMarkupWriter, IRequestCycle)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |