I have the following issue.
Here is the JSF template client:
<h:selectOneRadio value="#{booking.actividad}"
layout="pageDirection">
<f:selectItems value="#{actividadesClientBean.actividadesByFechaMayor}"
var="m"
itemValue="#{m.id}"
itemLabel="#{m.nombre}"/>
</h:selectOneRadio>
The value
tag on h:selectIneRadio
is supposed to save the selectedItem
in actividad String
variable on the booking Bean
. But when selected, nothing happens. It saves null
... The Items are correctly rendered, and all what has to do with the UI is correct. I've been looking for
the error four hours and nothing. Hope you can help me. Thanks!
Bean code:
@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
It's the first time I work with a faces-flow
. It might be something related with it. But I'm not quite sure. Here is my flow-chart:
<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>