org.ow2.opensuit.core.table
Class ITableRenderingContext

java.lang.Object
  extended by org.ow2.opensuit.core.table.ITableRenderingContext

public abstract class ITableRenderingContext
extends java.lang.Object

This abstract class gives access to the rendering context of the table that is currently being rendered.
This is specially useful if you want to implement pagination, sort and filtering at the application side.


Constructor Summary
ITableRenderingContext()
           
 
Method Summary
static ITableRenderingContext get(javax.servlet.http.HttpServletRequest iRequest)
          Retrieves the current table rendering context.
abstract  java.lang.String getFilter(int iColumn)
          Returns the filter text for the given column.
abstract  int getFirstIndex()
          Returns the first index.
abstract  int getPage()
          Returns the displayed page number.
abstract  int getRowsPerPage()
          Returns the maximum number of results displayed by the table.
abstract  int getSortColumn()
          Returns the index of the sorted column.
abstract  boolean getSortDirection()
          Returns the sort direction.
abstract  boolean hasFilters()
          Determines whether the current rendering context has defined filters.
abstract  boolean hasPagination()
          Determines whether the current table rendering context has pagination
abstract  boolean hasSortedColumn()
          Determines whether the current table rendering context has a sorted column
abstract  void setPage(int iPage)
          Allows to adjust the displayed page if the requested page is too high
abstract  void setRowsCount(int iNumberOfRows)
          Allows to set the number of rows.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ITableRenderingContext

public ITableRenderingContext()
Method Detail

get

public static ITableRenderingContext get(javax.servlet.http.HttpServletRequest iRequest)
Retrieves the current table rendering context.

Parameters:
iRequest - The HttpServletRequest (may be null)
Returns:

hasFilters

public abstract boolean hasFilters()
Determines whether the current rendering context has defined filters.

Returns:

getFilter

public abstract java.lang.String getFilter(int iColumn)
Returns the filter text for the given column.

Parameters:
iColumn -
Returns:

getFirstIndex

public abstract int getFirstIndex()
Returns the first index.

Returns:

getPage

public abstract int getPage()
Returns the displayed page number.

Returns:

getRowsPerPage

public abstract int getRowsPerPage()
Returns the maximum number of results displayed by the table. A null value means "no limit".

Returns:

getSortColumn

public abstract int getSortColumn()
Returns the index of the sorted column. A negative value means no sorted column.

Returns:

getSortDirection

public abstract boolean getSortDirection()
Returns the sort direction. true means ascending, false is descending.

Returns:

hasSortedColumn

public abstract boolean hasSortedColumn()
Determines whether the current table rendering context has a sorted column

Returns:

hasPagination

public abstract boolean hasPagination()
Determines whether the current table rendering context has pagination

Returns:

setRowsCount

public abstract void setRowsCount(int iNumberOfRows)
Allows to set the number of rows. This is only required in the case of a table that displays in page ranges.

Parameters:
iNumberOfRows -

setPage

public abstract void setPage(int iPage)
Allows to adjust the displayed page if the requested page is too high



Copyright © 2008-2012 OW2 Consortium. All Rights Reserved.