org.apache.tapestry.contrib.table.components
Class TableFormPages

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.BaseComponent
              extended by org.apache.tapestry.contrib.table.components.AbstractTableViewComponent
                  extended by org.apache.tapestry.contrib.table.components.TablePages
                      extended by org.apache.tapestry.contrib.table.components.TableFormPages
All Implemented Interfaces:
java.util.EventListener, org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, org.apache.tapestry.event.PageBeginRenderListener, org.apache.tapestry.event.PageDetachListener, org.apache.tapestry.IComponent, org.apache.tapestry.IRender, org.apache.tapestry.ITemplateComponent

public abstract class TableFormPages
extends TablePages
implements org.apache.tapestry.event.PageDetachListener, org.apache.tapestry.event.PageBeginRenderListener

A low level Table component that renders the pages in the table. This component is a variant of TablePages, but is designed for operation in a form. The necessary page data is stored in hidden fields, so that no StaleLink exceptions occur during a rewind. The links also submit the form, which ensures that the data in the other form fields is preserved even when the page chages. The component must be wrapped by TableView.

The component generates a list of pages in the Table centered around the current one and allows you to navigate to other pages.

Please see the Component Reference for details on how to use this component. [Component Reference]

Author:
mindbridge

Constructor Summary
TableFormPages()
           
 
Method Summary
 void changePage(org.apache.tapestry.IRequestCycle objCycle)
           
 int getCurrentPage()
           
 int getPageCount()
           
abstract  int getSelectedPage()
           
 int getStartPage()
           
 int getStopPage()
           
 void pageBeginRender(org.apache.tapestry.event.PageEvent event)
           
 void pageDetached(org.apache.tapestry.event.PageEvent event)
           
 void setCurrentPage(int i)
           
 void setPageCount(int i)
           
 void setStartPage(int i)
           
 void setStopPage(int i)
           
 
Methods inherited from class org.apache.tapestry.contrib.table.components.TablePages
getBackPageContext, getCondBack, getCondCurrent, getCondFwd, getDisplayPage, getDisplayPageContext, getFirstPageContext, getFwdPageContext, getLastPageContext, getPageList, getPagesDisplayed, setCurrentPage, setDisplayPage
 
Methods inherited from class org.apache.tapestry.contrib.table.components.AbstractTableViewComponent
getTableModelSource
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad, renderComponent
 
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, 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

TableFormPages

public TableFormPages()
Method Detail

pageDetached

public void pageDetached(org.apache.tapestry.event.PageEvent event)
Specified by:
pageDetached in interface org.apache.tapestry.event.PageDetachListener
See Also:
PageDetachListener.pageDetached(org.apache.tapestry.event.PageEvent)

pageBeginRender

public void pageBeginRender(org.apache.tapestry.event.PageEvent event)
Specified by:
pageBeginRender in interface org.apache.tapestry.event.PageBeginRenderListener
See Also:
PageBeginRenderListener.pageBeginRender(org.apache.tapestry.event.PageEvent)

changePage

public void changePage(org.apache.tapestry.IRequestCycle objCycle)
Overrides:
changePage in class TablePages

getSelectedPage

public abstract int getSelectedPage()

getCurrentPage

public int getCurrentPage()
Overrides:
getCurrentPage in class TablePages
Returns:
the current page

getPageCount

public int getPageCount()
Overrides:
getPageCount in class TablePages
Returns:
number of all pages to display

getStartPage

public int getStartPage()
Overrides:
getStartPage in class TablePages
Returns:
the first page to display

getStopPage

public int getStopPage()
Overrides:
getStopPage in class TablePages
Returns:
the last page to display

setCurrentPage

public void setCurrentPage(int i)
Parameters:
i - the current page

setPageCount

public void setPageCount(int i)
Parameters:
i - number of all pages to display

setStartPage

public void setStartPage(int i)
Parameters:
i - the first page to display

setStopPage

public void setStopPage(int i)
Parameters:
i - the last page to display