You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Florian Reiser <fl...@softproject.de> on 2008/07/30 11:23:00 UTC

[Trinidad] Scrolling table with partial row fetching?

Hello,

I have a fairly large table to display (> 1000 shown rows) in a big 
application (> 100 concurrent users).

I would like to show the table loading the individual rows only when shown.

<Pseudocode>
Start: Create a cursor at the database and count the rows. Initialise the 
scrolling display with it.
         Fetch the first 25 rows.

User scrolls to page 2: Fetch the next 25 rows

User scrolls to page 5: Fetch the rows up from row no. 51 to row no. 125
</Pseudocode>
With this behaviour I could avoid big memory requirements when 90% of the 
users only display the first page.
At the same time the other 10%  could scroll as far as they need at 
reasonable speed.

Is this possible?
How does Trinidad handle this issue?
Is there possibly a better solution?

With kind regards
Florian Reiser 



Re: [Trinidad] Scrolling table with partial row fetching?

Posted by Michael Meierhoff <Mi...@WebtopProject.de>.
Hi,

take a look at http://wiki.apache.org/myfaces/WorkingWithLargeTables. 
There is a example with a DataPage class which can handle lazy loading 
fetching objects.

Michael Meierhoff

Matthias Wessendorf schrieb:
> On Wed, Jul 30, 2008 at 11:49 AM, Döring Markus
> <Ma...@tcc-products.de> wrote:
>   
>> Hello,
>>
>> it's not a "scrolling" in the common sence, but tr:table supports pagination.
>>     
>
> scrolling would be a nice enhancement. Feel free to create a jira (and
> provide a patch ;-) )
> But paging is possible, yes.
>
>   
>> Look at
>> http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_table.html -> Range Navigation
>>
>> you have to implement your own tableModel to get the "lazy loading" stuff to work, but it's not a big deal.
>>
>> To see how it works look at
>> http://www.irian.at/trinidad-demo/faces/components/table_dynamic.jspx
>>
>> Regards
>> Markus
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: news [mailto:news@ger.gmane.org] Im Auftrag von Florian Reiser
>> Gesendet: Mittwoch, 30. Juli 2008 11:23
>> An: users@myfaces.apache.org
>> Betreff: [Trinidad] Scrolling table with partial row fetching?
>>
>> Hello,
>>
>> I have a fairly large table to display (> 1000 shown rows) in a big
>> application (> 100 concurrent users).
>>
>> I would like to show the table loading the individual rows only when shown.
>>
>> <Pseudocode>
>> Start: Create a cursor at the database and count the rows. Initialise the
>> scrolling display with it.
>>         Fetch the first 25 rows.
>>
>> User scrolls to page 2: Fetch the next 25 rows
>>
>> User scrolls to page 5: Fetch the rows up from row no. 51 to row no. 125
>> </Pseudocode>
>> With this behaviour I could avoid big memory requirements when 90% of the
>> users only display the first page.
>> At the same time the other 10%  could scroll as far as they need at
>> reasonable speed.
>>
>> Is this possible?
>> How does Trinidad handle this issue?
>> Is there possibly a better solution?
>>
>> With kind regards
>> Florian Reiser
>>
>>
>>
>>     
>
>
>
>   


Re: [Trinidad] Scrolling table with partial row fetching?

Posted by Matthias Wessendorf <ma...@apache.org>.
On Wed, Jul 30, 2008 at 11:49 AM, Döring Markus
<Ma...@tcc-products.de> wrote:
> Hello,
>
> it's not a "scrolling" in the common sence, but tr:table supports pagination.

scrolling would be a nice enhancement. Feel free to create a jira (and
provide a patch ;-) )
But paging is possible, yes.

>
> Look at
> http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_table.html -> Range Navigation
>
> you have to implement your own tableModel to get the "lazy loading" stuff to work, but it's not a big deal.
>
> To see how it works look at
> http://www.irian.at/trinidad-demo/faces/components/table_dynamic.jspx
>
> Regards
> Markus
>
>
> -----Ursprüngliche Nachricht-----
> Von: news [mailto:news@ger.gmane.org] Im Auftrag von Florian Reiser
> Gesendet: Mittwoch, 30. Juli 2008 11:23
> An: users@myfaces.apache.org
> Betreff: [Trinidad] Scrolling table with partial row fetching?
>
> Hello,
>
> I have a fairly large table to display (> 1000 shown rows) in a big
> application (> 100 concurrent users).
>
> I would like to show the table loading the individual rows only when shown.
>
> <Pseudocode>
> Start: Create a cursor at the database and count the rows. Initialise the
> scrolling display with it.
>         Fetch the first 25 rows.
>
> User scrolls to page 2: Fetch the next 25 rows
>
> User scrolls to page 5: Fetch the rows up from row no. 51 to row no. 125
> </Pseudocode>
> With this behaviour I could avoid big memory requirements when 90% of the
> users only display the first page.
> At the same time the other 10%  could scroll as far as they need at
> reasonable speed.
>
> Is this possible?
> How does Trinidad handle this issue?
> Is there possibly a better solution?
>
> With kind regards
> Florian Reiser
>
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

AW: [Trinidad] Scrolling table with partial row fetching?

Posted by Döring Markus <Ma...@tcc-products.de>.
Hello,

it's not a "scrolling" in the common sence, but tr:table supports pagination.

Look at
http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_table.html -> Range Navigation

you have to implement your own tableModel to get the "lazy loading" stuff to work, but it's not a big deal.

To see how it works look at
http://www.irian.at/trinidad-demo/faces/components/table_dynamic.jspx

Regards
Markus


-----Ursprüngliche Nachricht-----
Von: news [mailto:news@ger.gmane.org] Im Auftrag von Florian Reiser
Gesendet: Mittwoch, 30. Juli 2008 11:23
An: users@myfaces.apache.org
Betreff: [Trinidad] Scrolling table with partial row fetching?

Hello,

I have a fairly large table to display (> 1000 shown rows) in a big 
application (> 100 concurrent users).

I would like to show the table loading the individual rows only when shown.

<Pseudocode>
Start: Create a cursor at the database and count the rows. Initialise the 
scrolling display with it.
         Fetch the first 25 rows.

User scrolls to page 2: Fetch the next 25 rows

User scrolls to page 5: Fetch the rows up from row no. 51 to row no. 125
</Pseudocode>
With this behaviour I could avoid big memory requirements when 90% of the 
users only display the first page.
At the same time the other 10%  could scroll as far as they need at 
reasonable speed.

Is this possible?
How does Trinidad handle this issue?
Is there possibly a better solution?

With kind regards
Florian Reiser