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

java.lang.Object
  extended by org.apache.tapestry.spec.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:
EventListener, PageDetachListener, PageRenderListener, IComponent, ILocatable, ILocationHolder, IRender

public abstract class TableFormPages
extends TablePages
implements PageDetachListener, PageRenderListener

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]

Version:
$Id: TableFormPages.java 243791 2004-02-19 17:38:13Z hlship $
Author:
mindbridge

Constructor Summary
TableFormPages()
           
 
Method Summary
 void changePage(IRequestCycle objCycle)
           
 int getCurrentPage()
           
 int getPageCount()
           
abstract  int getSelectedPage()
           
 int getStartPage()
           
 int getStopPage()
           
 void pageBeginRender(PageEvent event)
          Invoked before just before the page renders a response.
 void pageDetached(PageEvent event)
          Invoked by the page from its IPage.detach() method.
 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, cleanupAfterRender, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, format, format, format, format, formatString, formatString, formatString, formatString, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification, toString
 
Methods inherited from class org.apache.tapestry.spec.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.event.PageRenderListener
pageEndRender
 
Methods inherited from interface org.apache.tapestry.ILocationHolder
setLocation
 
Methods inherited from interface org.apache.tapestry.ILocatable
getLocation
 

Constructor Detail

TableFormPages

public TableFormPages()
Method Detail

pageDetached

public void pageDetached(PageEvent event)
Description copied from interface: PageDetachListener
Invoked by the page from its IPage.detach() method.

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

pageBeginRender

public void pageBeginRender(PageEvent event)
Description copied from interface: PageRenderListener
Invoked before just before the page renders a response. This provides listeners with a last chance to initialize themselves for the render. This initialization can include modifying peristent page properties.

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

changePage

public void changePage(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