0

I am using p:datatable. The value inside p:columns is a sublist of p:datatable. But the list inside p:column is not displaying in the UI.

<p:dataTable id="examMarksVie" var="internal" editable="true"
    rowIndexVar="rowindex" rowKey="#{internal.internalMarkId}"
    style="width:90%;margin-left:70px;margin-top:5%"
    value="#{exam.internalMarkList}">
    <p:ajax event="rowEdit" listener="#{exam.doSaveInternalMark}"
        update="examMarksVie" />
    <p:column
        headerText="#{message['label.studentManagement.transferCertificate.studentName']}">
        <h:outputText
            value="#{internal.studentDetails.studentApplicationID.firstName} #{internal.studentDetails.studentApplicationID.middleName} #{internal.studentDetails.studentApplicationID.lastName}" />
    </p:column>
    <p:columns
        value="#{exam.internalMarkList.interALlocMarkList}"
        var="id" columnIndexVar="index"
        headerText="#{id.internalAllocId.titleName} out of #{id.internalAllocId.markDetail}">
        <p:inputText value="#{id.allocMark}" />
    </p:columns>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Guhan
  • 19
  • 4
  • When i am taking only the first index like below its working.But i need the entire list as different students may have different set of marks. How to achieve this? – Guhan Nov 17 '15 at 12:29
  • To find the answer, read the Answer, not the Question. – BalusC Nov 17 '15 at 12:34
  • This is my modified code.now the header is not working.whats problem in my code. – Guhan Nov 18 '15 at 07:49

1 Answers1

0

This impossible to accomplish with JSF using your code. Only way to do this is to create your own custom component that contains list (whole datatable). Then insert your CC tag in your existing table (in some p:column), and it will work.

Vanja Lee
  • 263
  • 4
  • 17