Hi,
I have a jsp where i'm using the "logic:iterate" tag to iterate over a
collection which has been put into the session by an action class with
the attribute= "collectionx"
On my jsp, I now need to iterate through the collection which has
elements that are objects of the class: SpecialTermsResult(this
bean/class has two String fields: code & description) & display
dynamically generated radio buttons with code & descriptions.The value
attribute of each radio tag should be the same as its code(the property
"code" of the bean SpecialTermsResult). How should I code for that?Is
the following code right?
<logic:iterate collection=collection id="SpecialTermsResult"
scope="session">
<tr>
<td>
<html:radio property="propertyX" value="<bean:write
name="SpecialTermsResult" property="code"/>"/>
</td>
<td>
<bean:write name="SpecialTermsResult" property="code"/>
</td>
<td>
<bean:write name="SpecialTermsResult"
property="description"/>
</td>
</tr>
</logic:iterate>
or should it be coded like this:
<logic:iterate collection=collection id="SpecialTermsResult"
scope="session">
<tr>
<td>
<html:radio>
<property>propertyX</property>
<value><bean:write name="SpecialTermsResult"
property="code"/></value>
</html:radio>
</td>
<td>
<bean:write name="SpecialTermsResult" property="code"/>
</td>
<td>
<bean:write name="SpecialTermsResult"
property="description"/>
</td>
</tr>
</logic:iterate>
Thanks.
Sanjay
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>