Hi everyone,
I'm having a problem with the selectOneRadio component in JSF1.2 where if user clicks on the label of the radio button, old selection value would still be passed as parameter in the ajax call. However if I click on the actual radio button of the option, everything works fine. New selection value will be passed.
====================================
[] Option 1 [] Option 2 [] Option 3
Steps:
Page starts with option 1 selected by default
Case 1:
If I click on the text "Option 2", JSFUtils.getParameters("paymentOption") will still return 0, which is the value of "Option 1"
If I then click on the text "Option 3", JSFUtils.getParameters("paymentOption") will return 1, which is the value of "Option 2"
Case 2:
If I click on the radio button "Option 2", JSFUtils.getParameters("paymentOption") will return 1, which is the correct value of "Option 2"
If I then click on the radio button "Option 3", JSFUtils.getParameters("paymentOption") will return 2, which is the correct value of "Option 3"
=====================================
Could someone please help me figure out how to fix this? Can I make clicking on label to have exact same behaviour as clicking on radio buttons?
Any help is greatly appreciated!
Code: