【发布时间】:2010-02-18 07:38:25
【问题描述】:
我想阅读表单提交时选择的角色信息(从角色列表中为用户选择角色)。如何在我的 EntityHome 界面中读取选定的单选按钮值(注意:我不想在这里使用 h:selectOneRadio 选项)
<tr>
<s:div rendered="#{userHome.instance.type ne 'admin'}">
<th width="150" class="rich-table-subheadercell center">#{_user.getName()}</th>
</s:div>
<c:forEach items="#{userHome.instance.roles}" var="_role">
<td width="150" class="center" style="background: rgb(100, 100, 100) none repeat scroll 0% 0%;">
#{_role.name}
<input type="radio" style="display : none" name="#{userHome.instance.id}" value="#{_role.id}"/>
</td>
</c:forEach>
</tr>
【问题讨论】:
-
这不会无缝运行。请详细说明为什么您不想使用
h:selectOneRadio(或任何其他JSF 组件)。它如何不足以满足您的要求?如果您详细说明不足和功能要求,我们或许能够提供正确的解决方案/变通方法。