【发布时间】:2012-06-15 04:55:54
【问题描述】:
我正在渲染一个带有单选按钮的表格。 即,在选择单选按钮时,需要重新渲染整个表单。 但这是行不通的。
这是我的代码:
<h:form id="summaryForm" prependId="false">
<table>
<tbody>
<ui:repeat var="switchRow" value="#{designBean.switchReport.rowList}" varStatus="rowStatus">
<tr class="#{rowStatus.even?'even':'odd'}">
<td>
<h:selectOneRadio id="switchTypeSelectionId"
name="switchTypeSelection"
styleClass="choices"
onclick="selectRadioButton(this);"
value="#{designBean.designTool.switchProduct}">
<f:selectItem itemValue="#{switchRow.rowId}"/>
<f:ajax event="click" execute="@this" render="@form" listener="#{designBean.showIGBTDetails}"/>
</h:selectOneRadio>
</td>
<ui:repeat var="switchColValue" value="#{switchRow.rowValues}">
<td>
<h:outputText value="#{switchColValue}" />
</td>
</ui:repeat>
</tr>
</ui:repeat>
</tbody>
</table>
</h:form>
【问题讨论】:
-
您的
<f:ajax listener>属性在 EL 表达式中包含语法错误。这是否也存在于您的真实代码中? -
好的,EL 语法错误因此不是您具体问题的原因。现在我们终于可以前进了 :) 这个问题可以识别为旧 Mojarra 版本中的错误。你在使用 Mojarra 吗?如果有,是哪个版本?如果它相当旧(超过约 6 个月),您是否尝试过升级它?