* Make sure that the values stored in the model are useable and correct.
* The changes made here are not saved.
*/
protected void validateValues()
{
ITableModel objModel = getTableModel();
// make sure current page is within the allowed range
ITablePagingState objPagingState = objModel.getPagingState();
int nCurrentPage = objPagingState.getCurrentPage();
int nPageCount = objModel.getPageCount();
if (nCurrentPage >= nPageCount)
{
// the current page is greater than the page count. adjust.
nCurrentPage = nPageCount - 1;
objPagingState.setCurrentPage(nCurrentPage);