jsf - Bean 不取值
问题描述
我有以下问题。
这是 JSF 模板客户端:
<h:selectOneRadio value="#{booking.actividad}"
layout="pageDirection">
<f:selectItems value="#{actividadesClientBean.actividadesByFechaMayor}"
var="m"
itemValue="#{m.id}"
itemLabel="#{m.nombre}"/>
</h:selectOneRadio>
value
标签 on h:selectIneRadio
应该将 in 变量保存在selectedItem
bookingactividad String
上Bean
。但是当被选中时,什么也没有发生。它节省了null
......项目被正确渲染,所有与用户界面有关的事情都是正确的。我一直在寻找错误四个小时,一无所获。希望您能够帮助我。谢谢!
豆子代码:
@Named
@FlowScoped("booking")
public class Booking implements Serializable {
@PersistenceContext
private EntityManager em;
private double precioC = new Double(0);
private String tarjeta = "";
private String actividad;
public String getActividad() {
return actividad;
}
public void setActividad(String actividad) {
this.actividad = actividad;
}
.......
.......
More code
这是我第一次使用faces-flow
. 这可能与它有关。但我不太确定。这是我的流程图:
<faces-config version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<flow-definition id="booking">
<flow-return id="goHome">
<from-outcome>/users/privatepage</from-outcome>
</flow-return>
</flow-definition>
</faces-config>
解决方案
推荐阅读
- python - 从c#执行python文件时没有输出
- android - 在 Android Studio 的 RecyclerView 中更新 TextView
- vb.net - Encoding.GetString 方法示例
- angular - 如何使用引导程序使 ngFor 水平?
- c# - 在自己的 .NET Core API 中使用来自另一个 API 的 JSON
- python - 在numpy中查找每一行的点积
- php - 基于用户角色的 Woocommerce 最低订单总数
- java - 如何使用 Selenium 和 Java 识别是否选择了带有伪元素 ::after 样式的单选按钮选项
- postgresql - Datagrip:创建postgres索引而不等待执行
- javascript - Bcrypt.compareSync 总是返回 false