myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject [myfaces-tobago] branch master updated: don't warn for empty sheets
Date Tue, 08 Jan 2019 08:45:27 GMT
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new 6270313  don't warn for empty sheets
6270313 is described below

commit 6270313cfde905052d0b95e08c8b99fc802b8a86
Author: Udo Schnurpfeil <lofwyr@apache.org>
AuthorDate: Tue Jan 8 09:45:14 2019 +0100

    don't warn for empty sheets
---
 .../myfaces/tobago/internal/component/AbstractUIData.java      | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIData.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIData.java
index 5453e4a..abd16f5 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIData.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIData.java
@@ -136,10 +136,12 @@ public abstract class AbstractUIData extends javax.faces.component.UIData
implem
     }
 
     if (getFirst() >= getRowCount()) {
-      LOG.warn("Illegal paging state detected, first='{}' >= rowCount='{}'. Setting first
to 0. "
-          + "This might happen because the data model has changed. "
-          + "You may want to manipulate the sheet state in your application after manipulating
the model "
-          + "(e. g. filtering) to avoid this warning.", getFirst(), getRowCount());
+      if (getRowCount() > 0) {
+        LOG.warn("Illegal paging state detected, first='{}' >= rowCount='{}'. Setting
first to 0. "
+            + "This might happen because the data model has changed. "
+            + "You may want to manipulate the sheet state in your application after manipulating
the model "
+            + "(e. g. filtering) to avoid this warning.", getFirst(), getRowCount());
+      }
       setFirst(0);
     }
 


Mime
View raw message