문제

I'm trying to implement an apache trinidad table in my web application. My code in my xhtml file is:

<tr:table value="#{Search.persons}" var="row" rows="10" emptyText="#{res.noRecordsFound}"
    rowBandingInterval="1" rowSelection="none" first="0">
<tr:column>
    <f:facet name="header">
        <tr:outputText value="Id"/>
    </f:facet>
    <tr:outputText value="#{row.id}"/>
</tr:column>
<tr:column>
    <f:facet name="header">
        <tr:outputText value="#{labels['Person.lastName']}"/>
    </f:facet>
    <tr:outputText value="#{row.lastName}"/>
</tr:column>
<tr:column>
    <f:facet name="header">
        <tr:outputText value="#{labels['Person.name']}"/>
    </f:facet>
    <tr:outputText value="#{row.firstName}"/>
</tr:column>
</tr:table>

The total number of #{Search.persons} is 21 rows. I use the attribute rows to retrieve 10 rows. The table containing the first 10 rows is rendered successfully. The "problem" is that no navigation (pagination) links are created by the table component. Do I have to change or add something in my code?

도움이 되었습니까?

해결책

Your tr:table must be inside a form. If it's not, the navigation links won't show.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top