*
* @return the newly generated table model
*/
protected ITableModel generateTableModel(SimpleTableState objState)
{
SimpleTableState usableObjState = objState;
// create a new table state if none is passed
if (usableObjState == null)
{
usableObjState = new SimpleTableState();
usableObjState.getSortingState().setSortColumn(getInitialSortColumn(),
getInitialSortOrder());
usableObjState.getPagingState().setCurrentPage(getInitialPage());
}
// update the page size if set in the parameter
if (isParameterBound("pageSize"))
usableObjState.getPagingState().setPageSize(getPageSize());
// get the column model. if not possible, return null.
ITableColumnModel objColumnModel = getTableColumnModel();
if (objColumnModel == null) return null;