On 7/13/06, Anitha Suraj <[EMAIL PROTECTED]> wrote:
Has anybody made a patch to disable next and previous buttons on dataScroller
on the last and first pages? If not, if any of you have already made this
change, can you please give us some pointers on what was done? Thanks.

I add rendered tags to remove them.   You could create disabled images
and render those with the negated conditions if you wanted to show
them as disabled.

Feel free to add this to the MyFaces wiki if you found it to be
helpful as the question has been asked before.


<t:dataScroller id="scroll_controls"
                                  for="searchResultsDataTable"
                                  fastStep="10"
                                  pageCountVar="pageCount"
                                  pageIndexVar="pageIndex"
                                  styleClass="scroller"
                                  paginator="#{true}"
                                  paginatorMaxPages="9"
                                  paginatorTableClass="paginator"
                                  paginatorActiveColumnStyle="font-weight:bold;"
                                  >
          <f:facet name="first">
                  <h:graphicImage
                          rendered="#{pageIndex gt 1}"
                          url="/images/arrow-first.gif"/>
          </f:facet>
          <f:facet name="fastrewind">
                  <h:graphicImage
                          rendered="#{pageIndex gt 1}"
                          url="/images/arrow-fr.gif"/>
          </f:facet>
          <f:facet name="previous">
                  <h:graphicImage
                          rendered="#{pageIndex gt 1}"
                          url="/images/arrow-previous.gif"/>
          </f:facet>
          <f:facet name="next">
                  <h:graphicImage
                          rendered="#{pageIndex lt pageCount}"
                          url="/images/arrow-next.gif"/>
          </f:facet>
          <f:facet name="fastforward">
                  <h:graphicImage
                          rendered="#{pageIndex lt pageCount}"
                          url="/images/arrow-ff.gif"/>
          </f:facet>
          <f:facet name="last">
                  <h:graphicImage
                          rendered="#{pageIndex lt pageCount}"
                          url="/images/arrow-last.gif"/>
          </f:facet>
</t:dataScroller>

Reply via email to