myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gcrawf...@apache.org
Subject svn commit: r1239428 - /myfaces/trinidad/branches/1.2.12.6.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java
Date Thu, 02 Feb 2012 01:19:46 GMT
Author: gcrawford
Date: Thu Feb  2 01:19:46 2012
New Revision: 1239428

URL: http://svn.apache.org/viewvc?rev=1239428&view=rev
Log:
TRINIDAD-2210  

thanks to Yuan.

Modified:
    myfaces/trinidad/branches/1.2.12.6.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java

Modified: myfaces/trinidad/branches/1.2.12.6.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.6.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java?rev=1239428&r1=1239427&r2=1239428&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.6.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java
(original)
+++ myfaces/trinidad/branches/1.2.12.6.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java
Thu Feb  2 01:19:46 2012
@@ -118,6 +118,28 @@ public abstract class CollectionModel ex
   }
 
   /**
+   * Returns the rowData for the given rowKey without changing model currency.  
+   * Implementations may choose to implement this behavior by saving and restoring the currency.
+   * 
+   * @see CollectionModel#getRowData()
+   * @param rowKey the row key of the row to get data from.
+   * @return the data for the given row. 
+   */
+  public Object getRowData(Object rowKey)
+  {
+    Object oldKey = getRowKey();
+    try
+    {
+      setRowKey(rowKey);
+      return getRowData();
+    }
+    finally
+    {
+      setRowKey(oldKey);
+    }
+  }
+
+  /**
    * Return true if this collection is sortable by the given property.
    * This implementation always returns false;
    */



Mime
View raw message