Info window paging

- Fixed a paging calculation error
- Fixed paging for Oracle, resultset.absolute doesn't work on forward only resultset.
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2913975
This commit is contained in:
Heng Sin Low 2010-03-09 17:47:10 +00:00
parent f59b902a34
commit 08aa2b0875
1 changed files with 6 additions and 3 deletions

View File

@ -450,7 +450,6 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
protected void renderItems()
{
Vector<String> columnHeader = getColumnHeader(p_layout);
if (m_count > 0)
{
if (m_count > PAGE_SIZE)
@ -504,7 +503,7 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
{
if (start+1 >= cacheStart && end+1 <= cacheEnd)
{
return end == -1 ? line : line.subList(start, end);
return end == -1 ? line : line.subList(start-cacheStart+1, end-cacheStart+2);
}
}
@ -563,7 +562,11 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
//skips the row that we dont need if we can't use native db paging
if (end > start && m_useDatabasePaging && !DB.getDatabase().isPagingSupported())
{
m_rs.absolute(cacheStart-1);
for (int i = 0; i < cacheStart - 1; i++)
{
if (!m_rs.next())
break;
}
}
int rowPointer = cacheStart-1;