Example: Flex Paginate Component   19 comments

Posted at 12:30 pm in Flash/Flex

Here’s a little paginator component we put together. There’s plenty of room to improve it - add css styling support, etc.. but thought I’d throw it out there in case someone finds it useful.

Source

Component Source

Written by paddy on August 4th, 2008

19 Responses to 'Example: Flex Paginate Component'

Subscribe to comments with RSS

  1. Beautiful!

    Great idea to use the slider.

    Ephraim

    24 Sep 08 at 11:02 am

  2. Considering the way Lists handle ItemRenderers in Flex is paging still necessary.

    What I’ve been doing, is say there are a 1000 records and paging size is set at 100. I’ve been populating the array with 1000 ‘pending’ items and then updating those items as i receive my paged data.

    That way the client only need use the List scrollbar as opposed to paging controls.

    make sense?

    Bjorn Schultheiss

    9 Oct 08 at 2:31 am

  3. hi Bjorn, Normally my advise would be to try and avoid pagination if you are only dealing with 100’s of records however any more than that pagination can be valid. i.e recently we worked on a app that was returning 10,000+ records. Scrolling a list became impractical. I like your idea about pending items and loading in sets of data as you scroll. I’ve been meaning to try that approach on some projects…
    Thanks paddy ;)

    paddy

    9 Oct 08 at 8:02 am

  4. Component looks sweet. I might take it and run with it if thats cool with you, i.e. adding styling etc.

    I’d also change the scroller at the bottom to a scrollbar.

    Maybe even a base class Paginator and a HPaginator, VPaginator extending it.

    Tink

    21 Oct 08 at 4:16 pm

  5. Feel free. The bottom scroller IS a styled ScrollBar, just could do with some methods to improve setting style dynamically. I was also going to add ‘< <' '>>’ buttons that scroll across a page set… anyway feel free to run with it as I ain’t got much time to develop it much more at the mo…

    paddy

    21 Oct 08 at 4:21 pm

  6. Hi - thanks for sharing this. Is it possible to use it in CS3 or Flex only?

    davidjmcclelland

    15 Dec 08 at 1:05 am

  7. it’s flex only I’m afraid

    paddy

    15 Dec 08 at 4:41 pm

  8. error in
    thumb-skin : ClassReference(”PaginatorScrollBar_thumbSkin”);
    track-skin : ClassReference(”PaginatorScrollBar_trackSkin”);

    How the definition of “PaginatorScrollBar_thumbSkin” and “PaginatorScrollBar_trackSkin”. thanks.

    jj

    4 Jan 09 at 6:19 am

  9. you need to make sure you include the ‘libs/paginagtorScrollSkin.swc’. (this is published from ’src/assets/paginagtorScrollSkin.fla’) have you downloaded the zip and imported it into Flex3?

    paddy

    4 Jan 09 at 11:43 am

  10. thanks,it is ok now.

    jj

    6 Jan 09 at 4:34 am

  11. Can I get your project code? I would like to reverse engineer this for CS3.

    Jimi

    25 Feb 09 at 10:04 pm

  12. hi Jimi, link to source code is bottom of the post

    paddy

    26 Feb 09 at 10:18 am

  13. Great work….I love this component.

    Rajiv Totlani

    13 Jun 09 at 10:32 pm

  14. Hi

    is there an equivalent thing for flash and AS3?

    if there is no component for flash is there a good tutorial for pagination with AS3?

    ron

    31 Jul 09 at 3:55 pm

  15. @ron I don’t know of a flash one but there’s no reason why you couldn’t look at the code and refactor it for flash? best of luck…

    paddy

    31 Jul 09 at 4:46 pm

  16. Hi,

    I wanted to refer this component to create a similar one for my application, At [resent I am unable to view the source code, so can you please help me download the source code for this component ?

    Thanks,
    Naveen

    naveen

    9 Sep 09 at 3:19 pm

  17. hi Naveen,

    There are 2 links under the example. ‘Source’ and ‘Component Source’. Granted they’re not that easy to see ;( but hopefully that will give you the juice ;) …

    paddy

    9 Sep 09 at 3:47 pm

  18. Hi,

    Your component is great an sexy but… I added it to an ADG of mine, and since that, the page loads veryyy veryyyy slow (up to 1 or 2 mn, browser (IE/FF) stuck, and not even a Flash progress bar)

    It appears that yours, on this page, is smooth, but a referrer to you, here : http://www.flex-tutorial.fr/category/advanceddatagrid/ seems to suffer the same slowdown.

    Any idea, ever met that behaviour???

    Cyril'

    26 Mar 10 at 4:03 pm

  19. I‘m a freshman of Flex.
    I have studied Flex3 for 3 weeks.
    This Demo is Great and Beautiful!

    Zhang Bo

    20 May 10 at 3:06 am

Leave a Reply