| Author |
problem with nested <logic:iterate>
|
Hd Desai
Ranch Hand
Joined: Aug 04, 2003
Posts: 65
|
|
Hi,
I have a scenario where i need to display table with n number of rows where each row will have a dropdown box.
This application is in struts 1.2 and I am not able to retrive value in <logic:iterate> and I get blank.
Here is my code snippet.Help on this would be appreciated.Thanks in advance.
<logic:iterate id="dtls" name="issCrdMaintForm" property="tmpRatingList" indexId="i">
<tr class="${tdClass}" >
<td >${dtls.id}
<html:hidden property="tmpRatingList[${i}].id" value="${dtls.id}"/>
</td>
<td >
<logic:iterate name="issCrdMaintForm" id="dtlsInner" property="snpList" indexId ="j">
<html:select property="tmpRatingList[${i}].snpList[${j}].value" >
<html ptionsCollection name="dtlsInner" property="snpList.name" />
</html:select>
</logic:iterate>
</td>
</tr>
</logic:iterate>
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
"s nk", please check your private messages for an important administrative matter. Thanks.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Hd Desai
Ranch Hand
Joined: Aug 04, 2003
Posts: 65
|
|
Hi Bear,
Sorry I am new here, if you can guide me where to look for private messages, I can do the needful .
Thanks
|
 |
Jaimesh M Ponkia
Greenhorn
Joined: Nov 24, 2010
Posts: 21
|
|
Hd Desai wrote:Hi Bear,
Sorry I am new here, if you can guide me where to look for private messages, I can do the needful .
Thanks
You will it on the top right side, search for "My Private Messages".
Did you verify if your collections are getting populated correctly? Try putting a notEmpty tag before iterating to check the same.
|
 |
Hd Desai
Ranch Hand
Joined: Aug 04, 2003
Posts: 65
|
|
Hi,
Yes I could find PM link and changed it.
Coming to my query,second list is not empty, it has values.But I think there is some syntax problem or different way to use it
basically what i have is
ArrayList Parent
id
name
ArrayList Child
where child has objects say obj with attribute as name.
I want to display this object contained in ArrayList Child as dropdown box.
Help would be appreciated.Thanks in advance.
|
 |
Jaimesh M Ponkia
Greenhorn
Joined: Nov 24, 2010
Posts: 21
|
|
There is no need to use iterator for the drop down list that you are displaying.
Something like this should work for you:
|
 |
 |
|
|
subject: problem with nested <logic:iterate>
|
|
|