Yes! You have to put in <f:ajax> inside a component. For Example:
Here,
variableInBean, most likely has to be
string. In bean you have to fetch this variable to know what user has selected.
listInBean, has to be a container. for example, ArrayList.
This is a dynamic way of doing it.
OR,
Static way where radio buttons has fixed labels.
Hope! This Helps.