Search code examples
jsftomahawk

tomahawk dataScroller don't show numbers pages


tomahawk dataScroller show only:

|<  <<  <       >   >>  >|

and not divides table on pages, shows all together

below part of jsp page:

<t:dataTable
    id="resultTable"
    value="#{customerSearchResults}"
    var="customerInfo" >
    <h:column>
        <f:facet name="header">
            <h:outputText value="Account #" />
        </f:facet>
        <h:outputText value="#{customerInfo.accountNumber}" />
    </h:column>
    <h:column>
        <f:facet name="header">
            <h:outputText value="Customer Name" />
        </f:facet>
        <h:outputText value="#{customerInfo.name}" />
    </h:column>
</t:dataTable>
<t:dataScroller 
    id="paginatorForResTable" 
    for="resultTable" 
    fastStep="10"
    paginatorMaxPages="9" 
    renderFacetsIfSinglePage="true"
    paginator="true"
    immediate="true"
    >
    <f:facet name="first">
        <h:outputText value="|&lt;" />
    </f:facet>
    <f:facet name="previous">
        <h:outputText value="&lt;" />
    </f:facet>
    <f:facet name="next">
        <h:outputText value="&gt;" />
    </f:facet>
    <f:facet name="last">
        <h:outputText value="&gt;|" />
    </f:facet>
    <f:facet name="fastforward">
        <h:outputText value="&gt;&gt;" />
    </f:facet>
    <f:facet name="fastrewind">
        <h:outputText value="&lt;&lt;" />
    </f:facet>
</t:dataScroller>

Does anyone know where is problem?


Solution

  • It was a really dumb question.

    Adding attribute rows to t:dataTable helps in my case:

    <t:dataTable
        id="resultTable"
        rows="10"
        value="#{customerSearchResults}"
        var="customerInfo" >
        <h:column>
            <f:facet name="header">
                <h:outputText value="Account #" />
            </f:facet>
            <h:outputText value="#{customerInfo.accountNumber}" />
        </h:column>
        <h:column>
            <f:facet name="header">
                <h:outputText value="Customer Name" />
            </f:facet>
            <h:outputText value="#{customerInfo.name}" />
        </h:column>
    </t:dataTable>