struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhaarat Sharma <bhaara...@gmail.com>
Subject preselect value for radio tag
Date Fri, 10 Jul 2009 16:22:39 GMT
I have a very simple radio tag like following
<s:radio label="correctOption" name="correctAnswer" id="correctOption"
list=" #{'1':'1','2':'2','3':'3','4':'4'}"
value="questionVo.correctAnswer"/>

questionVo.correctAnswer returns 2. So I want the second radio button to be
preselected but it is not happening. I even tried:

<s:radio label="correctOption" name="correctAnswer" id="correctOption"
list=" #{'1':'1','2':'2','3':'3','4':'4'}" value="%{1}"/>

but that does not work either.

what am I doing wrong?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message