How to make a for loop inside a h: dataTable in JSF

0

I'm making a list with a table in JSF, it's really easy to do it with the <h:dataTable> tag, but I need to loop inside the table to be able to filter certain data from another list. My code follows the following structure.

    <h:dataTable value="#{usrBean.usuarios}" var="u"
                    styleClass="table table-hover"
                    headerClass="order-table-header"
                    rowClasses="order-table-odd-row,order-table-even-row"
                        >

                    <h:column>
                        <!-- column header -->
                        <f:facet name="header">DNI</f:facet>
                        <!-- row record -->
                        #{u.idUsr}
                    </h:column>
    </h:dataTable>

I would like to know if what I intend is possible or should I do all the filters in the javaBean and then pass it "clean" to the xhtml.

    
asked by Randy Jesús 04.01.2018 в 15:23
source

0 answers