empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1383097 - in /empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2: pageelements/ListPageElement.java utils/TagEncodingHelper.java
Date Mon, 10 Sep 2012 20:21:10 GMT
Author: doebele
Date: Mon Sep 10 20:21:10 2012
New Revision: 1383097

URL: http://svn.apache.org/viewvc?rev=1383097&view=rev
Log:
EMPIREDB-157 
JSF2 another bugfix in TagEncodingHelper:checkRecord()

Modified:
    empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/ListPageElement.java
    empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java

Modified: empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/ListPageElement.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/ListPageElement.java?rev=1383097&r1=1383096&r2=1383097&view=diff
==============================================================================
--- empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/ListPageElement.java
(original)
+++ empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pageelements/ListPageElement.java
Mon Sep 10 20:21:10 2012
@@ -429,6 +429,16 @@ public abstract class ListPageElement<T>
         return (this.items == null) ? false : this.items.size() > 0;
     }
 
+    public final boolean isEmpty()
+    {
+        return (this.items==null || this.items.size()==0);
+    }
+
+    public final boolean isNotEmpty()
+    {
+        return (this.items!=null && this.items.size()>0);
+    }
+
     public int getItemCount()
     {
         return getTableInfo().getItemCount();

Modified: empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java?rev=1383097&r1=1383096&r2=1383097&view=diff
==============================================================================
--- empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java
(original)
+++ empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/utils/TagEncodingHelper.java
Mon Sep 10 20:21:10 2012
@@ -467,7 +467,13 @@ public class TagEncodingHelper implement
         else 
         {   // Do we have a record-tag?
             if (recordTag!=null)
-                setRecord(recordTag.getRecord());
+            {   // Check Record change
+                rec = recordTag.getRecord();
+                if (rec!=this.record)
+                {   // Record has changed
+                    setRecord(rec);
+                }
+            }    
             // Invalidate if not an instance of Record
             else if (!(this.record instanceof Record))
                 this.record = null;



Mime
View raw message