How to generate a dynamic data table with dynamic rows and columns? The rows and columns are dynamic based on backend values. The 2,3,4 columns will be a list of semester-subject combination list to store the selected value.
I know this can be achieved with primefaces. But is there a way to not use any libraries but achieve this with jsf 2.2?
My code is generating the semester-subject list in all one row.
<table>
<thead>
<tr>
<th>Enrollment</th>
<c:forEach items="#{semesterTO.getSubjects()}" varStatus="loop"
var="subjects" id="subjectsId">
<th>#{subjects.Name}</th>
</c:forEach>
</tr>
</thead>
<tbody>
<c:forEach items="#{semesterTO.getSemesters()}" var="semester"
varStatus="status1">
<tr>
<td><h:outputText value="#{semester.semesterId}" /></td>
</tr>
</c:forEach>
<c:forEach items="#{semesterTO.subjectSemesterList()}" var="a"
varStatus="status2">
<tr>
<td><h:selectBooleanCheckbox
value="#{semesterTO.enrolledSubjects[a]}" /></td>
</tr>
</c:forEach>
</tbody>
</table>