You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Hans Sowa <ha...@gmail.com> on 2006/05/18 15:13:01 UTC

DataTable and Lazy-Loading

Hi all

First following Scenario: I know that I will have to load 20.000 Records and
I want to display it with a scrollable Datatable.

Is it possible to load only the first page and then if the user klicks on
the scroller the correct page will load from the table?

Thanks in advance.

-- 
mfg Hans Sowa
mailto:hanssowa@gmail.com

Re: DataTable and Lazy-Loading

Posted by Hans Sowa <ha...@gmail.com>.
Hi Cosma

Thanks for the hint but both are always null.

I found out that I could use an actionlister. The ScrollerActionEvent
contains the attributes mPageIndex and mScrollerfacet. It the user clicks
directly to the page the attribute mPageIndex contains the pagenumber. It
the user clicks on the next button or what ever the mScrollerfacet contains
"next", ... and the mPageIndex contains -1. So, with this actually I could
calculate the current page and could find out which lins are shown but I
can't believe that there is not a better way to find out which lins are
currently shown in a scrollable datatable.

I hope you or another person has an better idea.

Thanks a lot.

Hans

On 5/19/06, Cosma Colanicchia <co...@gmail.com> wrote:
>
> If you are using a dataScroller, you can try to take a look at its
> firstRowIndexVar and lastRowIndexVar.
>
>
> 2006/5/19, Hans Sowa <ha...@gmail.com>:
> > Hi Cosma
> >
> > I need to know that in my backing bean.
> >
> >
> > On 5/19/06, Cosma Colanicchia <co...@gmail.com> wrote:
> > > Hi Hans,
> > >
> > > where you need to know that? In your backing bean? In your page?
> > >
> > >
> > >
> > > 2006/5/19, Hans Sowa <ha...@gmail.com>:
> > > > Hi Cosma
> > > >
> > > > Thanks a lot. This should help me.
> > > >
> > > > I have a further question independent from this here. If I have a
> Data
> > Table
> > > > without lazy loading and I want to know which rows are currently
> shown
> > how
> > > > can I do this? I don't have an idea so far!
> > > >
> > > > Thanks a lot.
> > > >
> > > > Hans
> > > >
> > > >
> > > > On 5/18/06, Cosma Colanicchia < cosmacol@gmail.com> wrote:
> > > > > See this wiki entry:
> > > > >
> > > > > http://wiki.apache.org/myfaces/WorkingWithLargeTables
> > > > >
> > > > >
> > > > > Cosma
> > > > >
> > > > >
> > > > > 2006/5/18, Hans Sowa < hanssowa@gmail.com>:
> > > > > > Hi all
> > > > > >
> > > > > > First following Scenario: I know that I will have to load 20.000
> > Records
> > > > and
> > > > > > I want to display it with a scrollable Datatable.
> > > > > >
> > > > > > Is it possible to load only the first page and then if the user
> > klicks
> > > > on
> > > > > > the scroller the correct page will load from the table?
> > > > > >
> > > > > > Thanks in advance.
> > > > > >
> > > > > > --
> > > > > > mfg Hans Sowa
> > > > > > mailto: hanssowa@gmail.com
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > mfg Hans Sowa
> > > > mailto:hanssowa@gmail.com
> > >
> >
> >
> >
> > --
> >
> > mfg Hans Sowa
> > mailto:hanssowa@gmail.com
>



-- 
mfg Hans Sowa
mailto:hanssowa@gmail.com

Re: DataTable and Lazy-Loading

Posted by Cosma Colanicchia <co...@gmail.com>.
If you are using a dataScroller, you can try to take a look at its
firstRowIndexVar and lastRowIndexVar.


2006/5/19, Hans Sowa <ha...@gmail.com>:
> Hi Cosma
>
> I need to know that in my backing bean.
>
>
> On 5/19/06, Cosma Colanicchia <co...@gmail.com> wrote:
> > Hi Hans,
> >
> > where you need to know that? In your backing bean? In your page?
> >
> >
> >
> > 2006/5/19, Hans Sowa <ha...@gmail.com>:
> > > Hi Cosma
> > >
> > > Thanks a lot. This should help me.
> > >
> > > I have a further question independent from this here. If I have a Data
> Table
> > > without lazy loading and I want to know which rows are currently shown
> how
> > > can I do this? I don't have an idea so far!
> > >
> > > Thanks a lot.
> > >
> > > Hans
> > >
> > >
> > > On 5/18/06, Cosma Colanicchia < cosmacol@gmail.com> wrote:
> > > > See this wiki entry:
> > > >
> > > > http://wiki.apache.org/myfaces/WorkingWithLargeTables
> > > >
> > > >
> > > > Cosma
> > > >
> > > >
> > > > 2006/5/18, Hans Sowa < hanssowa@gmail.com>:
> > > > > Hi all
> > > > >
> > > > > First following Scenario: I know that I will have to load 20.000
> Records
> > > and
> > > > > I want to display it with a scrollable Datatable.
> > > > >
> > > > > Is it possible to load only the first page and then if the user
> klicks
> > > on
> > > > > the scroller the correct page will load from the table?
> > > > >
> > > > > Thanks in advance.
> > > > >
> > > > > --
> > > > > mfg Hans Sowa
> > > > > mailto: hanssowa@gmail.com
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > mfg Hans Sowa
> > > mailto:hanssowa@gmail.com
> >
>
>
>
> --
>
> mfg Hans Sowa
> mailto:hanssowa@gmail.com

Re: DataTable and Lazy-Loading

Posted by Hans Sowa <ha...@gmail.com>.
Hi Cosma

I need to know that in my backing bean.

On 5/19/06, Cosma Colanicchia <co...@gmail.com> wrote:
>
> Hi Hans,
>
> where you need to know that? In your backing bean? In your page?
>
>
>
> 2006/5/19, Hans Sowa <ha...@gmail.com>:
> > Hi Cosma
> >
> > Thanks a lot. This should help me.
> >
> > I have a further question independent from this here. If I have a Data
> Table
> > without lazy loading and I want to know which rows are currently shown
> how
> > can I do this? I don't have an idea so far!
> >
> > Thanks a lot.
> >
> > Hans
> >
> >
> > On 5/18/06, Cosma Colanicchia <co...@gmail.com> wrote:
> > > See this wiki entry:
> > >
> > > http://wiki.apache.org/myfaces/WorkingWithLargeTables
> > >
> > >
> > > Cosma
> > >
> > >
> > > 2006/5/18, Hans Sowa < hanssowa@gmail.com>:
> > > > Hi all
> > > >
> > > > First following Scenario: I know that I will have to load 20.000Records
> > and
> > > > I want to display it with a scrollable Datatable.
> > > >
> > > > Is it possible to load only the first page and then if the user
> klicks
> > on
> > > > the scroller the correct page will load from the table?
> > > >
> > > > Thanks in advance.
> > > >
> > > > --
> > > > mfg Hans Sowa
> > > > mailto:hanssowa@gmail.com
> > >
> >
> >
> >
> > --
> >
> > mfg Hans Sowa
> > mailto:hanssowa@gmail.com
>



-- 
mfg Hans Sowa
mailto:hanssowa@gmail.com

Re: DataTable and Lazy-Loading

Posted by Cosma Colanicchia <co...@gmail.com>.
Hi Hans,

where you need to know that? In your backing bean? In your page?



2006/5/19, Hans Sowa <ha...@gmail.com>:
> Hi Cosma
>
> Thanks a lot. This should help me.
>
> I have a further question independent from this here. If I have a Data Table
> without lazy loading and I want to know which rows are currently shown how
> can I do this? I don't have an idea so far!
>
> Thanks a lot.
>
> Hans
>
>
> On 5/18/06, Cosma Colanicchia <co...@gmail.com> wrote:
> > See this wiki entry:
> >
> > http://wiki.apache.org/myfaces/WorkingWithLargeTables
> >
> >
> > Cosma
> >
> >
> > 2006/5/18, Hans Sowa < hanssowa@gmail.com>:
> > > Hi all
> > >
> > > First following Scenario: I know that I will have to load 20.000 Records
> and
> > > I want to display it with a scrollable Datatable.
> > >
> > > Is it possible to load only the first page and then if the user klicks
> on
> > > the scroller the correct page will load from the table?
> > >
> > > Thanks in advance.
> > >
> > > --
> > > mfg Hans Sowa
> > > mailto:hanssowa@gmail.com
> >
>
>
>
> --
>
> mfg Hans Sowa
> mailto:hanssowa@gmail.com

Re: DataTable and Lazy-Loading

Posted by Hans Sowa <ha...@gmail.com>.
Hi Cosma

Thanks a lot. This should help me.

I have a further question independent from this here. If I have a Data Table
without lazy loading and I want to know which rows are currently shown how
can I do this? I don't have an idea so far!

Thanks a lot.

Hans

On 5/18/06, Cosma Colanicchia <co...@gmail.com> wrote:
>
> See this wiki entry:
>
> http://wiki.apache.org/myfaces/WorkingWithLargeTables
>
>
> Cosma
>
>
> 2006/5/18, Hans Sowa <ha...@gmail.com>:
> > Hi all
> >
> > First following Scenario: I know that I will have to load 20.000 Records
> and
> > I want to display it with a scrollable Datatable.
> >
> > Is it possible to load only the first page and then if the user klicks
> on
> > the scroller the correct page will load from the table?
> >
> > Thanks in advance.
> >
> > --
> > mfg Hans Sowa
> > mailto:hanssowa@gmail.com
>



-- 
mfg Hans Sowa
mailto:hanssowa@gmail.com

Re: DataTable and Lazy-Loading

Posted by Cosma Colanicchia <co...@gmail.com>.
See this wiki entry:

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


Cosma


2006/5/18, Hans Sowa <ha...@gmail.com>:
> Hi all
>
> First following Scenario: I know that I will have to load 20.000 Records and
> I want to display it with a scrollable Datatable.
>
> Is it possible to load only the first page and then if the user klicks on
> the scroller the correct page will load from the table?
>
> Thanks in advance.
>
> --
> mfg Hans Sowa
> mailto:hanssowa@gmail.com