Thank you Mike,

But I guess I either didn't understand your suggestion or I didn't explain my problem well. What I want to change are the numbers that appear between the "next page" "previous page" buttons. Going through the code in the HtmlDataScrollerRenderer, what I want to be able to tap into is the "renderPaginator()" code when it renders the HtmlCommandLink.

I see two possibilities: one is to substitute the "Integer.toString(idx)" for an indirection that allows you to override it; or allow you to override the whole renderPaginator() code and add your own paginator in place of it. I'll most likely select the latter and, for the purpose of getting the project done, create my own subclass of the HtmlDataScrollerRenderer and implement my custom page rendering mechanism.

Is this a reasonable thing to add to the component itself? I could see if in the process I can generalize it a little and then submit it for review if people think it's a valid use case...

Thank you again,
Michel



On 8/15/06, Mike Kienenberger < [EMAIL PROTECTED]> wrote:
It's completely configurable by the components it encloses.  For
example, here's one that I use.

I'd imagine you'd simply put a dataList inside it and iterate over
your page results set, maybe from #{firstRowIndex}" to
#{lastRowIndex}", and translate those into letters.

                                <t:dataScroller id="scroll_information"
                                                for="">                                                rowsCountVar="rowsCount"
                                                displayedRowsCountVar="displayedRowsCountVar"
                                                firstRowIndexVar="firstRowIndex"
                                                lastRowIndexVar="lastRowIndex"
                                                pageCountVar="pageCount"
                                                pageIndexVar="pageIndex"
                                                >
                                        <h:panelGrid
                                                columns="1">
                                                <h:outputText
                                                        rendered="#{jstl:length(searchFeesPage.feeList) gt 0 and
searchFeesPage.limit eq jstl:length( searchFeesPage.feeList)}"
                                                        value="Warning: Maximum number of search results returned." />
                                                <h:outputFormat value="{0} records found, displaying {1}
records, from {2} to {3}. Page {4} / {5}" styleClass="standard" >
                                                        <f:param value="#{rowsCount}" />
                                                        <f:param value="#{displayedRowsCountVar}" />
                                                        <f:param value="#{firstRowIndex}" />
                                                        <f:param value="#{lastRowIndex}" />
                                                        <f:param value="#{pageIndex}" />
                                                        <f:param value="#{pageCount}" />
                                                </h:outputFormat>
                                        </h:panelGrid>
                                </t:dataScroller>



On 8/15/06, Michel Goldstein < [EMAIL PROTECTED] > wrote:
> Hi,
>
> I was wondering if there is an easy way to modify the numbering of the
> dataScroller component to instead of showing the page number, to show
> something like the first two letters of the first element of that page
> (considering that the table is always sorted on a specific column). I've
> looked around and couldn't find anywhere to control the "number labels" on
> the component. Am I missing something?
>
> Thank you,
> Michel
>

Reply via email to