0

I try to make a data table group of PrimeFaces. All goes well. The number of columns is correct, colspan= "#{asignaturaController.nombrePruebasEscritas1.size()} but the name of each test does not show and the object pointed to is full. I tried everything. Anyone have any idea?

This is my result.

enter image description here

but I need the names of "Pruebas" over the "pruebas"

<h:form id="form-tablapruebasescritas1"
        renderer="#{asignaturaController.nombrePruebasEscritas1.size() != 0}">

    <p:dataTable var="player"
                 value="#{asignaturaController.alumnos}"
                 id="tablapruebasescritas1"
                 style="margin-top:40px"
                 sortOrder="ascending">

        <f:facet name="header">
            1ª Evaluacion
        </f:facet>

        <p:columnGroup type="header">
            <p:row>
                <p:column rowspan="2" headerText="Alumno" />
                <p:column  colspan="#{asignaturaController.nombrePruebasEscritas1.size()}"
                           headerText="Pruebas" />
            </p:row>

            <p:row>
                <ui:repeat value="#{asignaturaController.nombrePruebasEscritas1}"
                           var="yea">
                    <p:column headerText="#{yea}" />
                </ui:repeat>
            </p:row>
        </p:columnGroup>

        <p:column>
            <h:outputText value="#{player.nombre}" />
        </p:column>
        <p:columns value="#{asignaturaController.nombrePruebasEscritas1}"
                   var="year">
            <h:outputText value="#{player.getNotaParaTabla(year)}" />
        </p:columns>
    </p:dataTable>
</h:form>
Tiny
  • 27,221
  • 105
  • 339
  • 599
Rastaldi
  • 1
  • 1
  • I compared your code to the [showcase example](http://www.primefaces.org/showcase/ui/data/datatable/group.xhtml), and it looks fine to me. Maybe start with some simpler examples to make sure each part is working correctly. You may find some problem in your backing-beans. – DavidS Jun 22 '15 at 19:53
  • A small correction : `renderer` defined `` should be `rendered`. – Tiny Jun 23 '15 at 05:00

0 Answers0