I've been thinking about this same issue lately, it seems to me that the only component that must stores it's data in the session is the DataTable (the DataModel may be lazy, but it still must be in the session) and other Collection based components like dataList.  Other components don't necessarily have this requirement, you can bind output's and inputs to request based objects. 

I got to thinking how this issue could be overcome and generally in non-jsf apps, you use some "id" field in the object to identify the item in a list.  So what if you could specify on the dataTable an "identityField" attribute like <t:dataTable identityField="id"...   Then on the backend instead of trying to match up object identity, we can just match up the identityField.  This way, you could reload the data each request and wouldn't have to worry if the list changed in the database because you would only try to find the matching identity field. 

Travis

On 4/25/06, Werner Punz <[EMAIL PROTECTED] > wrote:
Werner Punz schrieb:
> [EMAIL PROTECTED] schrieb:
>> I have a Datatable which has thousands of items in it. I get this items
>> via a database. I don't want to store them in the session, because this
>> will kill the session...
>>
>> So I put it into request scope.. The problem now is the the datascroller
>> doesn't work anymore, because I loose the list, because it's only in
>> request scope...
>>
>> What would be the best way to overcome this problem?
>>
>
> Using a datamodel overcomes this problem.
> There is a wiki entry in the myfaces wiki which describes exactly
> on how to write your own custom data models.
>
>
sorry for the missing link, it took me a while to dig it out:

http://wiki.apache.org/myfaces/WorkingWithLargeTables

or at least it should be I cannot reach the wiki currently :-(


Reply via email to