使用 JSF 的单选复选框
我正在 JSF 中创建注册表单,并且我的字段为“活动”、“非活动”,我需要使用复选框,并且这些复选框应为“仅单选”。 (注意:我可以使用单选按钮并解决问题,但是由于某些问题我必须使用复选框)。
请建议我如何完成这项工作?
提前致谢...
I am creating registration form in JSF and I have field as Active, Inactive where I need to use check boxes and these checkboxes should be SINGLE SELECT ONLY. (Note: I can use radio button and solve the problem, however due to some problem I have to use check boxes).
Please suggest me how to get this done?
Thanks in advance...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您需要的是
。绑定到该组件的值只能是 true(活动)或 false(非活动)。它将类似于以下内容:I think what you need is
<h:selectBooleanCheckbox>
. The value binded to this component can only be either true (Active) or false (Inactive). It will be something like the following: