|
||||||||||
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
public abstract class 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 class org.apache.tapestry.AbstractComponent |
---|
_body, _bodyCount |
Fields inherited from interface org.apache.tapestry.contrib.table.model.ITableModelSource |
---|
TABLE_MODEL_SOURCE_ATTRIBUTE |
Constructor Summary | |
---|---|
TableView()
The component constructor. |
Method Summary | |
---|---|
void |
executeTableActions()
Executes the stored table actions. |
void |
fireObservedStateChange()
Invoked when there is a modification of the table state and it needs to be saved. |
protected ITableColumnModel |
generateTableColumnModel(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 Serializable |
getClientAppState()
|
abstract Serializable |
getClientState()
|
abstract Object |
getColumns()
|
abstract 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 String |
getInitialSortColumn()
|
abstract boolean |
getInitialSortOrder()
|
abstract TableColumnModelSource |
getModelSource()
|
abstract int |
getPageSize()
|
abstract String |
getPersist()
|
abstract Serializable |
getSessionState()
|
abstract Object |
getSource()
|
abstract List |
getTableActions()
|
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 Serializable |
loadSessionState()
Loads the table state using the SessionStoreManager. |
void |
pageBeginRender(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(PageEvent objEvent)
Invokes the component member initializations. |
protected void |
renderComponent(IMarkupWriter writer,
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(Serializable sessionState)
|
abstract void |
setClientState(Serializable sessionState)
|
abstract void |
setSessionState(Serializable sessionState)
|
abstract void |
setTableActions(List actions)
|
protected void |
storeSessionState(Serializable objState)
Stores the table state using the SessionStoreManager. |
void |
storeTableAction(ITableAction action)
Stores the provided table action. |
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, getContainedRenderers, getInnerRenderers |
Methods inherited from class org.apache.hivemind.impl.BaseLocatable |
---|
getLocation, setLocation |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.tapestry.IComponent |
---|
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName |
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 Object getSource()
public abstract Object getColumns()
public abstract int getInitialPage()
public abstract String getInitialSortColumn()
public abstract boolean getInitialSortOrder()
public abstract ITableSessionStateManager getTableSessionStateManager()
public abstract ITableSessionStoreManager getTableSessionStoreManager()
public abstract IComponent getColumnSettingsContainer()
public abstract int getPageSize()
public abstract String getPersist()
public abstract Serializable getSessionState()
public abstract void setSessionState(Serializable sessionState)
public abstract Serializable getClientState()
public abstract void setClientState(Serializable sessionState)
public abstract Serializable getClientAppState()
public abstract void setClientAppState(Serializable sessionState)
public abstract List getTableActions()
public abstract void setTableActions(List actions)
public void pageDetached(PageEvent objEvent)
pageDetached
in interface 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(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(PageEvent event)
fireObservedStateChange()
has
not been invoked.
pageBeginRender
in interface PageBeginRenderListener
PageBeginRenderListener.pageBeginRender(org.apache.tapestry.event.PageEvent)
protected void saveSessionState()
protected Serializable loadSessionState()
protected void storeSessionState(Serializable objState)
objState
- the table state to storeprotected void validateValues()
protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
renderComponent
in class BaseComponent
BaseComponent.renderComponent(IMarkupWriter,
IRequestCycle)
public void storeTableAction(ITableAction action)
storeTableAction
in interface ITableModelSource
action
- The action to store.public void executeTableActions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |