Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

problem with logic:iterator in dividing the rows to two coloums

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
Help me in formatting the code so that it displays two coloums in a table
posted Today 7:59 AM
--------------------------------------------------------------------------------
[Hi friends,
I have the below code, please some one help me in formatting the below code so as to display two coloums in a table.
<table cellpadding="0" cellspacing="0" border="0" id="AutoNumber15">
<tbody><tr id="parentTable">
<% int prodCnt = 0; %>
<td style="vertical-align: top">
<logic:iterate id="prodTree" name="productSelectionForm" property="treeSet" type="java.util.Map.Entry" indexId="idx">
<bean efine id="product" name="prodTree" property="value" type="java.util.Properties"/>
<% if (prodCnt == 0 || prodCnt == 10) { %>
<td style="vertical-align: top">
<table cellpadding="6" cellspacing="0" width="350" id="AutoNumber15">
<tbody>
<%} %>
<logic:equal name="product" property="level" value="1">
<% prodCnt++; %>
<tr style="background-color: #D8D8D8" id="<%=prodTree.getKey()%>">
<td style='<%= "padding-left:" + product.getProperty("indent") + ";width:1;background-color: #D8D8D8"%>'>
<html:multibox style="background-color: #D8D8D8" name="productSelectionForm" property="selectedProducts" ">
<bean:write name="prodTree" property="key"/>
</html:multibox>
</TD>
<td nowrap style='color:blue;font-weight:bold;width:200;background-color:#D8D8D8;text-align:left'>
<bean:write name="product" property="name" />
</td>
<td NOWRAP style="background-color: #D8D8D8;width:200"/>
<td style='color:blue;cursor:hand;text-decoration:underline;width:200
>Learn more</td>

</tr>
<tr>
<td colspan="4" bgcolor="#FFFF99";id="<%=prodTree.getKey()%>"
style="display: none" id="toggleMe" text-align:left>
<bean:write name="product" property="learn_more" />
</td></tr>

<tr>
<td colspan='3'><a href="javascript roductToggle(this)" style="text-decoration:underline">See All Subproducts</a></td>
</tr>
</logic:equal>

</logic:iterate>

<% if (prodCnt == 10 || prodCnt == 18) { %>

</tbody>
</table></td>
<% } %>
</td></tr>
</tbody>
</table>
with regards,
 
What are you saying? I thought you said that Santa gave you that. And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic