Bhaarat Sharma wrote:
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?
http://struts.apache.org/2.1.6/docs/why-wont-the-if-tag-evaluate-a-one-char-string.html
Also, "%{1}" evaluates to a number, whereas "%{'1'}" evaluates to a char
and '%{"1"}' evaluates to a string.
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org