提问人:johndonnon 提问时间:2/5/2018 最后编辑:Ashish Mathewjohndonnon 更新时间:2/6/2018 访问量:310
在 Form 中为 JSF 单选按钮提供什么值?[复制]
What value to give JSF Radiobuttons in Form? [duplicate]
问:
这个问题在这里已经有答案了:
如何在 JSF bean 中发送表单输入值并调用方法 (1 个答案)
如何从数据库中填充h:selectOneMenu的选项? (5 个答案)
如何在 f:selectItem 中使用枚举值 (4 个答案)
5年前关闭。
我的 jsf xhtml 文件中有两个表单中的单选按钮,但我不知道我应该给它们哪些值以及给我的提交按钮哪个值。两个单选按钮决定用户是否要从他的帐户中存入或取款(这是我所在班级的在线自动取款机的模拟)我有一个 Bean,其中有两种存款或取款方法,但我无法弄清楚这一点。(我是新来的,对不起)
<h:outputLabel class="form-check-label">
<h:selectOneRadio value="#{}">
<f:selectItem itemValue="#{}"
itemLabel="Deposit" />
<f:selectItem itemValue="#{}"
itemLabel="Withdraw" />
</h:selectOneRadio>
</h:outputLabel>
<button type="submit" class="btn btn-primary">Submit</button>
答:
0赞
M.A.Bell
2/5/2018
#1
<h:selectOneRadio value="#{}">
<f:selectItem itemValue="#{}"
itemLabel="Deposit" />
<f:selectItem itemValue="#{}"
itemLabel="Withdraw" />
</h:selectOneRadio>
<h:selectOneRadio value="#{}">
将变量放在要放置所选值的位置
<f:selectItem itemValue="#{}" itemLabel="Deposit" />
输入单选按钮的值
请参阅此处的示例 h:Radiobutton mkyoung 和 h:RadioButton 教程点
评论