You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tremal Naik <tr...@gmail.com> on 2005/10/04 19:08:36 UTC

nesting radio buttons

Hello,
I'm trying to render a questionnaire on a page using radio buttons.
The questionnaire is built as a list of questions, each with some
answers the user may check using radio buttons.

<input type="radio" name="question1" value="1">
<input type="radio" name="question1" value="2">
<input type="radio" name="question1" value="3">
.....
<input type="radio" name="question2" value="1">
<input type="radio" name="question2" value="2">
<input type="radio" name="question2" value="3">

My form has an ArryList property, populated with QuestionBean beans
which have a property that is an ArrayList of AnswerBean beans. I'm
trying to populate the page with a sintax of the form:

<nested:iterate property="questions">
  <nested:message property="questionLabel"/>
 ...
  <nested:iterate property="answers">
      <html:radio idName="answers" value="value" property="question" />
  </nested:iterate>
</nested:iterate>

I was not able to find the correct syntax. If i ue the <html:radio>
tag I'm not able to set an indexed radio name, if I use the
<nested:radio /> I'm not able to set a value for the 'value' attribute
other than a costant. How did you solve this problem?

Any hint would be appreciated

thanks,

--
TREMALNAIK

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: nesting radio buttons

Posted by Tremal Naik <tr...@gmail.com>.
2005/10/4, Tremal Naik <tr...@gmail.com>:
> Hello,
> I'm trying to render a questionnaire on a page using radio buttons.

I'm using Struts 1.1


--
TREMALNAIK

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org