0
The query that mounts the screen is as follows :
public List<Produto> listarProdutosDoGerenteRegional() {
    try {
        return manager.createQuery(" select p from Produto p where p.gerenteFilial.chefe.codigo =:codigo", Produto.class)
                .setParameter("codigo", usuario.getCodigo()).getResultList();
    } catch (NoResultException e) {
        return null;
    }
}
I would like to place the managing branch field next to each other and their respective quantities as well. the other fields would continue.
<p:dataTable id="previsaosTable"
    value="#{previsaoGerenteRegionalBean.previsoes}" 
    var="produto"
    style="margin-top: 20px" 
    emptyMessage="#{msg.nenhum_tecnico}"
    paginatorPosition="bottom" 
    rows="5" 
    paginator="true"
    paginatorTemplate="{RowsPerPageDropdown} {PreviousPageLink} {CurrentPageReport} {NextPageLink}"
    currentPageReportTemplate="(#{msg.pagina} {currentPage} #{msg.de} {totalPages}) - (#{msg.registro} {startRecord} #{msg.a} {endRecord}) - Total ({totalRecords} #{msg.registros})"
    styleClass="mystyle" 
    paginatorAlwaysVisible="true"
    rowsPerPageTemplate="10, 20, 30">
    <f:facet id="header" name="header">
        lista de Historicos
    </f:facet>
    <p:column headerText=" Codigo do Produto"
        sortBy="#{produto.codigoProduto}"
        style="text-align: center; width: 140px">
        <h:outputText value="#{produto.codigoProduto}">
        </h:outputText>
    </p:column>
    <p:column headerText=" Descrição"
        style="text-align: center; width: 140px">
        <h:outputText value="#{produto.descricao}">
        </h:outputText>
    </p:column>
    <p:column headerText=" Gerente Filial"
        style="text-align: center; width: 140px">
        <h:outputText value="#{produto.gerenteFilial.nome}">
        </h:outputText>
    </p:column>
    <p:column headerText=" Valor"
        style="text-align: center; width: 140px">
        <h:outputText value="#{produto.valor}">
        </h:outputText>
    </p:column>
    <p:column headerText=" Quantidade"
        style="text-align: center; width: 140px">
        <h:outputText value="#{produto.quantidadeRecente}">
        </h:outputText>
    </p:column>
    <p:column headerText=" Receita da Previsão"
        style="text-align: center; width: 140px">
        <h:outputText value="#{produto.quantidadeReais}">
            <f:convertNumber locale="pt_BR" minFractionDigits="2"
                maxFractionDigits="2" />
        </h:outputText>
    </p:column>
    <p:column style="width: 100px; text-align: center"
        headerText="#{msg.acoes}">
        <p:commandButton icon="ui-icon-trash" title="#{msg.excluir}"
            oncomplete="confirmacaoExclusao.show()" process="@this"
            update=":frmPesquisa:confirmacaoExclusaoDialog">
            <f:setPropertyActionListener
                target="#{pesquisaHistoricosBean.previsaoSelecionado}"
                value="#{tecnico}" />
        </p:commandButton>
    </p:column>
</p:dataTable>
						
Man, can I explain your doubt better? It’s too vague
– Henrique Santiago
I didn’t understand the doubt
– igventurelli
I would like to place in the title of the list BRANCH MANAGER 1 and below its quantity beside BRANCH MANAGER 2 and below its respective the following column the sum of the two quantities and the last column the multiplication between the sum of the quantities and the value column
– user2509556