0

I have a primefaces datatable that allows grouping by rows and I want print on backing bean the rowgroups and the rows index that each rowgroup contains

here is the xhtml

<p:dataTable 
    id="tblPartidas"
    var="item"                                     
    draggableRows="true"
    rowKey="#{item.objProd.idProd}"
    binding="#{cotizacionController.dtPartidasSelec}"
    value="#{cotizacionController.lstPartidasSelec}">   
    <p:headerRow field="desGrupo">
        <p:column colspan="5" style="background-color: #BFBFBF">
            <div class="inline-flex align-items-center" 
                 style="vertical-align: middle">
                <h:outputText class="p-3 text-dark" value="#{item.desGrupo}"/>
            </div>
        </p:column>
    </p:headerRow>
    <p:column headerText="No." width="20" style="padding: 1px;text-align: center" class="d-none">
        <h:outputLabel value="#{cotizacionController.lstPartidasSelec.indexOf(item) + 1}" />
    </p:column>
    <p:column headerText="Partida" width="200" sortBy="#{item.objProd.desProd}">
        <h:outputText class="fw-bold text-uppercase" value="#{item.objProd.desProd}"/><br/>     
    </p:column>
</p:dataTable>

In backing bean i created a binding but i dont know how to access to the rowgroups detail

private DataTable dtPartidasSelec;

0 Answers0