I was usinig JSF 2.0, richfaces, and a4j in my development. I have a radio button group that consist of 3 radio button, and there is a inputtextbox next to each of the radio button, just like the layout shown below:
radio button A | input textbox A
radio button B | input textbox B
radio button C | input textbox C
Whenever there is a focus on textbox, can this be done using ajax to update on radio button selection? E.g. when focus on input textbox B, then radio button B will be selected. May I know how this can be done?
There are many ways to this, first using plain
javascriptand usingajaxonjsforrichfacescomponents.You can try using
a4j:ajaxnested inside yourh:inputTextand fire it whenever there isfocuson yourtextbox.On the action method set the value of selected radio to true.
Hope this helps.