• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Problem with html:radio tag within logic:iterate

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have a formBean named QusteionBean containing a question and four answers. From the action class, I loaded these beans in a vector and passed in the request(qt). I want to display the questions and the answers(as radio buttons). My code is given below.
<html:form action="/submitAnswer" method="get"> <logic:iterate id="qt" name="questions" indexId="index">
<bean:write name="qt" property="qst_id"/>.
<bean:write name="qt" property="qst_desc"/>
<html:radio name="qt" property="qst_ans" value="1" indexed="true">
<bean:write name="qt" property="qst_ans1"/>
</html:radio>
<html:radio name="qt" property="qst_ans" value="2" indexed="true">
<bean:write name="qt" property="qst_ans2"/>
</html:radio>
<html:radio name="qt" property="qst_ans" value="3" indexed="true">
<bean:write name="qt" property="qst_ans3"/>
</html:radio>
<html:radio name="qt" property="qst_ans" value="4" indexed="true">
<bean:write name="qt" property="qst_ans4"/>
</html:radio>
<html:radio name="qt" property="qst_ans" value="5" indexed="true">
<bean:write name="qt" property="qst_ans5"/>
</html:radio>

</logic:iterate> <html:submit value="SUBMIT"/> </html:form>

Is there any other method to do this? Because, it is very difficult to retrieve the data!
Thanx in advance.
Sunil.
Sunil.Manheri@ae.ey.com
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic