javajsftomahawk

Tomahawk datascroller next en previous


I'm using tomahawk's datascroller to page though data in a datatable. I have two facets, next and previous defined. I noticed that as soon as there is data to be paged, the next and previous buttons appear, regardless. ie, if you are on the fist page, previous is still shown, and if you are on the last page next is shown.

I've RTFM'ed the docs and could find nothing to aid me. Same with a google search. Any-one out there that can help me?


Solution

  • Devised a fix in the meantime, have logged a bug with ASF for this, probably gonna get yelled at or have the ASF police arrest me for asking silly questions:

    <f:facet name="previous"><h:panelGroup rendered="#{pageIndex != 1}">&lt; Previous</h:panelGroup></f:facet>
    

    Remember to set pageCountVar="pageCount" and pageIndexVar="pageIndex"

    Mr Noob out..