myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject [myfaces-tobago] 01/02: don't warn for empty sheets
Date Wed, 09 Jan 2019 17:37:27 GMT
This is an automated email from the ASF dual-hosted git repository.

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

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

    don't warn for empty sheets
    
    (cherry picked from commit 6270313cfde905052d0b95e08c8b99fc802b8a86)
---
 .../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 4d4d0bc..cd4e740 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
@@ -135,10 +135,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