JSF/Seam - call one component method for many radio groups
- by purecharger
I've got the following jsf page:
<h:form>
<ui:repeat value="#{list.categories}" var="cat">
<h:selectOneRadio id="sel1Rad" value="#{list.choose}" layout="pageDirection">
<f:selectItems value="#{list.names}"/>
</h:selectOneRadio>
</ui:repeat>
<h:commandButton id="submit" action="#{list.submit}" value="Submit"/>
</h:form>
And a component named list. The variable cat is injected to the component, used by the method list.getNames(). What I am trying to have happen is to have list.choose() be called for each radio group. I'm not sure if this is possible with Seam. Going by the booking example distributed with Seam, there is a distinct separate method for each selectOneRadio or selectOneMenu group.
Since I have an unknown number of categories, I can't / don't want to define a method for each possible choice.
When I submit the form, all my choices are sent in the POST, I just don't know the correct way to tell Seam how to dispatch them to my component.
Any help is appreciated!