myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jing Wu <jing.x...@oracle.com>
Subject Re: [TRINIDAD][API] JIRA 2253 - Ability to synchronize UI view size with model cache size
Date Wed, 28 Mar 2012 22:18:14 GMT
Thanks Prakash!

Yes, essentially, we are making sure the rows are available in the 
model, in an implicit way. makeRowsAvailable() sounds good to me.

Thanks,
Jing

On 3/28/2012 11:48 AM, Prakash Udupa wrote:
> Since you already specify the number of rows to make sure is available 
> in the model, this looks more of a 'fetch a specified number of rows', 
> than 'sync' (with what ?) service.
>
> Can we consider the following name for the methods instead ?:
>
> public void makeRowsAvailable(int numRows)
>
> This also matches well with the areRowsAvailable() methods on the 
> CollectionModel and UIXCollection.
>
> Thanks,
> Prakash
>
> On 3/28/2012 1:16 PM, Jing Wu wrote:
>> Any comments?
>>
>> -Jing
>>
>> On 3/27/2012 10:18 AM, Jing Wu wrote:
>>> Hi,
>>>
>>> please review the new API we added for JIRA 2253: 
>>> https://issues.apache.org/jira/browse/TRINIDAD-2253
>>>
>>> For table/tree/treeTable, it's very possible that some rows on the 
>>> client side may not be available in the model at server side. One 
>>> example is when the model supports ranging and range size is 
>>> relatively small. In that case, if one tries to access the row on 
>>> client that's not available in the model, issues will arise.
>>>
>>> This enhancement is to provide the ability to synchronize the number 
>>> of rows in the model with the number of rows at client, to make sure 
>>> the model contains at least the same amount of rows as that on the 
>>> client. The model can choose how to respond to size synchronization 
>>> depending on it's own logic.
>>>
>>> public method syncNumRows() is added to UIXCollection to initiate 
>>> the synchronization.
>>>
>>>   /**
>>>    * Synchronize the number of rows client and server cache. The server
>>>    * should keep no less what what client caches.
>>>    *
>>>    * @param numRows the number of rows client holds
>>>    */
>>>   public void syncNumRows(int numRows)
>>>   {
>>>     getCollectionModel().syncNumRows(numRows);
>>>   }
>>>
>>>
>>> The default implementation of syncNumRows on CollectionModel is to 
>>> do nothing.
>>>   /**
>>>    * Synchronize the number of rows client and server cache. For 
>>> collection models that
>>>    * do paging, they should keep row cache no less that what client 
>>> holds.
>>>    *
>>>    * @param numRows the number of rows client holds
>>>    */
>>>   public void syncNumRows(int numRows)
>>>   {
>>>     return;
>>>  }
>>>
>>>
>>> Thanks,
>>> Jing
>>>

Mime
View raw message