I have a problem regarding the implementation of my radioGroup. If I selected one of the options, and clicked the button “Apply Changes”, the success message is shown, but the value that I have chosen is unselected, which seems that I haven’t selected any values from my radioGroup at all. This is my code:
<cm:fieldRow required="true" label="Nature of employment" hint="" bean="${employmentInfo}" field="employmentNature.id">
<g:radioGroup name="employmentNature.id" values="${EmploymentNature.list().id}" labels="${EmploymentNature.list().title}">
${it.radio} ${it.label}<br/>
</g:radioGroup>
</cm:fieldRow>
When I haven’t selected any of the values from the radioGroup, and clicked on the “Add Changes” button, the error message that I have set is not showing.Please help! Thanks!
You need to make use of the
valueattribute forg:radioGroup. Without avalueattribute, the tag doesn’t know which radio should be checked.