on primefaces 3.3 there is this component called carousel. their example shows that they have all the data loaded from a constructor on from the backing bean all at once. this is good if you have small amount of content
obviously if I have let say 3000 items to display, it will dump all of it to the browser making it too hard for the server and even for the client to navigate.
what I would like to do is. when the user click previous or next button of carousel, I would like dynamically in some sort of ajax pass the index of the the last content that and fetch new one, let say if it was visible from 1 to 5, and the user pressed the next button on the backing bean send the 5, so I can fetch 6 t0 10. how can I can do that, is this feature can be actually accomplished in jsf 2.0 and primefaces.
As Damien noted, PrimeFaces' Carousel doesn't support lazy loading. However PrimeFaces' DataTable does support this and has a similar look and feel.
For an excellent example of the DataTable with lazy loading see PrimeFaces' showcase.
Of course you can try to modify the source of PrimeFaces since it is an open source project. But I think the DataTable alternative is easier. ;-)