2

I trie to migrate an page using richfaces to primefaces. I have a rich:datatable with multiple rich:collapsibleSubTable.

I tried to replace that with p:datatable and p:subtable like this

 <p:dataTable id="actorenTable" value="#{listActorsPageController.fileView}" var="file">
                            <f:facet name="header">
                                <p:columnGroup>
                                    <p:column>
                                        <h:outputText value="#{msg.name}"/>
                                    </p:column>
                                    <p:column>
                                        <h:outputText value="#{msg.dateofbirth}"/>
                                    </p:column>
                                    <p:column>
                                        <h:outputText value="#{msg.address_address}"/>
                                    </p:column>
                                </p:columnGroup>
                            </f:facet>
                            <p:subTable value="#{file.fileOwner}" var="owner" id="fileOwnerTable">
                                <p:column>
                                    <h:outputText value="#{owner.name}"/>
                                </p:column>
                                <p:column>
                                    <h:outputText value="#{owner.birthDate}"/>
                                </p:column>
                                <p:column>
                                    <h:outputText value="#{owner.addressFullDescription}"/>
                                </p:column>
                            </p:subTable>
                            <p:subTable value="#{file.beneficiaries}" var="beneficiary" id="beneficiariesTable">
                                <p:column>
                                    <h:outputText value="#{beneficiary.name}"/>
                                </p:column>
                                <p:column>
                                    <h:outputText value="#{beneficiary.birthDate}"/>
                                </p:column>
                                <p:column>
                                    <h:outputText value="#{beneficiary.addressFullDescription}"/>
                                </p:column>
                            </p:subTable>
                        </p:dataTable>

When I do this, the first subtable (fileOwnerTable) informations are displayed but no the second (beneficiariesTable). If I switch the subtables so I can see the beneficiariesTable informations but no the fileOwnerTable informations.

What can I do to resolve that ?

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
schwuleur
  • 41
  • 2
  • 2
    Please note it is deprecated since 10 https://primefaces.github.io/primefaces/12_0_0/#/../migrationguide/10_0_0 So, use row group instead. – Jasper de Vries Mar 15 '23 at 13:14

0 Answers0