You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ba...@apache.org on 2005/10/10 09:24:16 UTC
svn commit: r312573 -
/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/datascroller/HtmlDataScrollerRenderer.java
Author: baranda
Date: Mon Oct 10 00:24:11 2005
New Revision: 312573
URL: http://svn.apache.org/viewcvs?rev=312573&view=rev
Log:
Fixes MYFACES-676
Modified:
myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/datascroller/HtmlDataScrollerRenderer.java
Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/datascroller/HtmlDataScrollerRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/datascroller/HtmlDataScrollerRenderer.java?rev=312573&r1=312572&r2=312573&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/datascroller/HtmlDataScrollerRenderer.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/datascroller/HtmlDataScrollerRenderer.java Mon Oct 10 00:24:11 2005
@@ -102,7 +102,7 @@
String pageIndexVar = scroller.getPageIndexVar();
if (pageIndexVar != null)
{
- int pageIndex = scroller.getPageIndex();
+ int pageIndex = (scroller.getRowCount() > 0)? scroller.getPageIndex() : 0;
requestMap.put(pageIndexVar, new Integer(pageIndex));
}
String rowsCountVar = scroller.getRowsCountVar();
@@ -123,7 +123,7 @@
String firstRowIndexVar = scroller.getFirstRowIndexVar();
if (firstRowIndexVar != null)
{
- int firstRowIndex = scroller.getFirstRow() + 1;
+ int firstRowIndex = (scroller.getRowCount() > 0)? scroller.getFirstRow() + 1 : 0;
requestMap.put(firstRowIndexVar, new Integer(firstRowIndex));
}
String lastRowIndexVar = scroller.getLastRowIndexVar();