rinku
rinku

Reputation: 11

<p:row> renders incorrect result

I have been working on this problem from last two days. I went through the apis possibly I could refer to but no luck.

I have been using ui:repeat as jsf facelet to render data with rows and columns

Code for reference

<ui:repeat var="pendingRequestItem" value="#{oqHomeController.allRequests}" > --JSF
    <p:row rendered="#{oqHomeController.renderPendingRequest}> -- PRIMEFACES FOR ROW
       <td><h:outputText value="#{pendingRequestItem.title}" /></td>
       <td><h:outputText value="#{oqHomeController.pendingCount}" /></td>
    </p:row>
</ui:repeat>

And the above code is resulting in the following which is very strange.

<tbody>
       <td>Request for Quote 1</td>
       <td>1</td>
       <td>DTHEME1</td>
       <td>4</td>
</tbody>

I hope it should be

<tbody>
       <tr>
         <td>Request for Quote 1</td>
         <td>1</td>
       </tr>
       <tr>
         <td>DTHEME1</td>
         <td>4</td>
       </tr>
</tbody>

Please help thanks.

Upvotes: 0

Views: 335

Answers (1)

Philipp
Philipp

Reputation: 333

Have you tried <p:dataTable> it seems that is what you are looking for:

<p:dataTable var="pendingRequestItem" value="#{oqHomeController.allRequests}">
    <p:column>
        <h:outputText value="#{pendingRequestItem.title}"/>
    </p:column>
    <p:column>
        <h:outputText value="#{oqHomeController.pendingCount}"/>
    </p:column>
</p:dataTable>

Upvotes: 1

Related Questions