logic:iterate tags
Hi to everyone,
Iam new to this forum and a novice to java. I have a issue relating to using the struts frame work.
The Problem:
In the application(online test) which iam developing i need to print the questions the user has attempted, his answers and the correct answers(its basically to facilitate the test taker to analyse his result.)
Pictotrially each question and its correct answer(s) and its useranswer(s) are represented below....
arraylist(eachquestionList:(question,List:(this questions correct answers),List:(this questions user answers)))...
SEEKING SOLUTION FOR:
Printing this nested lists in a JSP using the logic:iterate tags.....
I need help and fast...
> iam not alowed to send confidential materials...
I don,t think that showing 3 lines is very confidential.....especially struts code. Anyway....
It's not very hard to nest one iterate into another iterate tag. What's hard in that ? Try with a simple example on your own and who us what you've learned. if you still have problems, we will greatly help you. But not going to do it for you...
Hi,
I am using two arraylists, one is quesArray and the other is answerArray.
I want to print them one by one like
ques1 ans1
ques2 ans2
my form bean name is selectionCriteriaForm.
I am using the following code to do that, pls help me in writing the code.
<logic:iterate id="item" name="selectionCriteriaForm" >
<bean:write name="item" property="quesArray"/>
<logic:iterate id="item2" name="selectionCriteriaForm" >
<bean:write name="item2" property="answerArray"/>
Thanx in advance.
Hi,
You can simply do it using html like the following :
<table>
<tr>
<td>
<%--Table of Questions-->
<table>
[b]for each question[/b]
<tr> <td>xxx</td></tr>
<tr> <td>xxx</td> </tr>
....
</table>
</td>
<td>
<%--Table of Responses-->
<table>
[b]for each response[/b]
<tr> <td>xxx</td></tr>
<tr> <td>xxx</td> </tr>
....
</table>
</td>
</tr>
</table>
HTH