In relation with my original question I still have the following issue: process a selectOneRadio value in one column of a table to update a value in another column of the same table.
In my original question where I tried it with a datatable and a subtable, after lametaweb's suggestion and as this question did not give successful result because of the following behaviour: "tabView1:1:form1:mainTable:0:subTable1:0:panel
" (without correct cliendId) seen in the HTML, I manually built the table with nested <c:forEach>
to reconstruct the same.
But neither nor are updating the value in the table. And Here is an example of the actual clientId in the HTML: form0:j_idt71:0
.
<h:form id="form0">
<table id="table0">
<c:forEach var="head" items="#{subTableView.getAllHeaders('tabName')}">
<tr>
<td>
<h:outputLabel style="bold" value="#{head.name}" />
</td>
</tr>
<c:forEach var="row" items="#{head.questions}">
<tr>
<td width="300" height="33">
<h:outputLabel value="#{row.question}" />
</td>
<td width="500">
<p:selectOneRadio id="mainSelect" value="#{row.select1}" >
<f:selectItem itemLabel="Yes" itemValue="#{row.responseOfYes}" />
<f:selectItem itemLabel="No" itemValue="#{row.responseOfNo}" />/>
<p:ajax update="display" listener="#{subTableView.updateSecond(row.select1)}"/>
</p:selectOneRadio>
</td>
<td width="600">
<h:outputLabel id="display" value="#{row.select1}" />
</td>
</tr>
</c:forEach>
</c:forEach>
</table>
`.