struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Muhammad Momin Rashid" <mo...@amaana.com>
Subject Two collections and iterate: How to set corresponding values in second collection while iterating through first?
Date Sat, 24 Jul 2004 13:12:36 GMT
Hi,

I have two collections of objects one contains the questions, and the second
is place holder for answers the user is supposed to provide.

questions is a collection of question (= id, text, type)
answers is a collection of answer (= id, questionId, answer)

now in my jsp i would like to do something like this

<logic:iterate id="ques" name="questions" indexId="i">
    <bean:write name="ques" property="text"/>

    ?? for the corresponding answer in the answers collection
    ?? set the questionId
    ?? display a text box for user to enter answer text

</logic:iterate>

Regards,
Muhammad Momin Rashid





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


Mime
View raw message