Author: abelevich
Date: 2010-07-05 14:23:38 -0400 (Mon, 05 Jul 2010)
New Revision: 17723
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java
Log:
fix division by zero
Modified: root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java 2010-07-05
17:06:08 UTC (rev 17722)
+++ root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java 2010-07-05
18:23:38 UTC (rev 17723)
@@ -274,7 +274,15 @@
}
public int getRelativeRowIndex() {
- return (getRowIndex() % getRows());
+ int rows = getRows();
+ if(rows == 0) {
+ rows = getRowCount();
+ }
+
+ int rowIndex = getRowIndex();
+ rows = (rows == 0) ? rowIndex : (rowIndex % rows);
+
+ return (rows);
}
public String getRelativeClientId(FacesContext facesContext) {
Show replies by date