You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gc...@apache.org on 2012/04/20 02:09:52 UTC

svn commit: r1328153 - in /myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad: component/UIXCollection.java model/CollectionModel.java

Author: gcrawford
Date: Fri Apr 20 00:09:52 2012
New Revision: 1328153

URL: http://svn.apache.org/viewvc?rev=1328153&view=rev
Log:
TRINIDAD-2253 Ability to synchronize UI view size with model cache size`

thanks to Jing

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

Modified: myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java?rev=1328153&r1=1328152&r2=1328153&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java (original)
+++ myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java Fri Apr 20 00:09:52 2012
@@ -1376,6 +1376,15 @@ public abstract class UIXCollection exte
     return getCollectionModel().getCachingStrategy();
   }
   
+  /**
+   * Ensure that the model has at least rowCount number of rows.
+   *
+   * @param rowCount the number of rows the model should hold.
+   */  
+  public void ensureRowsAvailable(int rowCount)
+  {
+    getCollectionModel().ensureRowsAvailable(rowCount);
+  }
 
   /**
    * override this method to place initialization code that must run

Modified: myfaces/trinidad/branches/1.2.12.7.0-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.7.0-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java?rev=1328153&r1=1328152&r2=1328153&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java (original)
+++ myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java Fri Apr 20 00:09:52 2012
@@ -327,5 +327,17 @@ public abstract class CollectionModel ex
   {
     return LocalRowKeyIndex.LocalCachingStrategy.NONE;
   }
+
+  /**
+   * Ensure that the model has at least rowCount number of rows. This is especially
+   * useful for collection model that support paging. The default implementation
+   * is a no-op.
+   *
+   * @param rowCount the number of rows the model should hold.
+   */   
+  public void ensureRowsAvailable(int rowCount)
+  {
+    return;
+  }
   
 }