tags:

views:

50

answers:

1

Hello All,

I am having some difficulties while trying to understand the radio buttons logic.

I have two radio buttons and their name is FR.

From the database, I am retrieving a value which is "F" or "R".

I would like to do that If the value = F then the radio button which is Freeze to be checked else the other radio button to be chekced.

I tried to use

if FV_Value.equals("F") then I stopped where I do not know exactly how to deal with them.

Can you please help? and give me an example

+1  A: 

You should print the checked attribute whenever the button's value matches the model value.

<input type="radio" name="fr" value="F" ${model.fv == 'F' ? 'checked' : ''}>
<input type="radio" name="fr" value="R" ${model.fv == 'R' ? 'checked' : ''}>
BalusC