I'm doing a booking system where you choose an origin and a destination and with that information you look for routes in a table in a database. I have a pojo representing a route, I have a bean called RouteController with getters and setters for a List and the current route.
Getting the list of routes is no problem, but getting one route from the list doesn't work for me, the setter is only setting null and never a route. What am I doing wrong?
<p:selectOneRadio id="grid" value="#{routeController.route}" layout="pageDirection">
<f:selectItems value="#{routeController.routes}"/>
</p:selectOneRadio>
<p:button id="submitButton" value="Submit" outcome="result.xhtml"/>