myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject svn commit: r267200 - /myfaces/api/trunk/src/java/javax/faces/model/ResultSetDataModel.java
Date Fri, 02 Sep 2005 13:30:51 GMT
Author: oros
Date: Fri Sep  2 06:30:47 2005
New Revision: 267200

URL: http://svn.apache.org/viewcvs?rev=267200&view=rev
Log:
fixed containsValue() issue

Modified:
    myfaces/api/trunk/src/java/javax/faces/model/ResultSetDataModel.java

Modified: myfaces/api/trunk/src/java/javax/faces/model/ResultSetDataModel.java
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/src/java/javax/faces/model/ResultSetDataModel.java?rev=267200&r1=267199&r2=267200&view=diff
==============================================================================
--- myfaces/api/trunk/src/java/javax/faces/model/ResultSetDataModel.java (original)
+++ myfaces/api/trunk/src/java/javax/faces/model/ResultSetDataModel.java Fri Sep  2 06:30:47
2005
@@ -259,7 +259,18 @@
 
         public boolean containsValue(Object value)
         {
-            return super.containsValue(value);
+            Set keys = keySet();
+            for (Iterator iterator = keys.iterator(); iterator.hasNext();) {
+                Object object = get(iterator.next());
+                if (object == null) {
+                    return value == null;
+                }
+                if (object.equals(value)) {
+                    return true;
+                }
+
+            }
+            return false;
         }
 
         public Set entrySet()
@@ -272,6 +283,12 @@
             if (!containsKey(key))
                 return null;
 
+            return basicGet(key);
+        }
+
+
+        private Object basicGet(Object key)
+        {  //#################################################### remove
             try
             {
                 _resultSet.absolute(_currentIndex + 1);
@@ -284,6 +301,7 @@
                 throw new FacesException(e);
             }
         }
+
 
         public Set keySet()
         {



Mime
View raw message