wood burning stoves 2.0*
The moose likes Struts and the fly likes struts logic:iterate problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts logic:iterate problem" Watch "struts logic:iterate problem" New topic
Author

struts logic:iterate problem

smitha mano
Ranch Hand

Joined: Sep 26, 2005
Posts: 70
list.jsp
<body>
<logic resent name="dList">
<table width="76%" border="0" align="center">
<tr>
<tr>
<td bgcolor="#F2F2F2"><strong>Id</strong></td>
<td bgcolor="#F2F2F2"><strong>Name</strong></td>
<td bgcolor="#F2F2F2"><strong>Qualification</strong></td>
<td bgcolor="#F2F2F2"><strong>Experience</strong></td>
</tr>
</tr>
<logic:iterate name="dList" id="lt">
<tr>
<td><html:link action="myAction.do?action=view&id=${lt.id}">${lt.id}</html:link></td>
<td>${lt.name}</td>
<td>${lt.qual}</td>
<td>${lt.Exp}</td>
</tr>
</logic:iterate>
</table>
</body>

in my list.jsp contian this fields. it displays
as follows design

<table width="34%" border="0" align="center">
<tr>
<td width="6%"><strong> Id</strong></td>
<td width="54%"><strong> Name</strong></td>
<td width="13%"><strong>Qualification</strong></td>
<td width="27%"><strong> Experience</strong></td>
</tr>
<tr>
<td><div align="center">1</a></div></td>
<td>Anu Elias</td>
<td>MCA</td>
<td>4</td>
</tr>
<tr>
<td><div align="center">2</a></div></td>
<td>Martin Kurian</td>
<td>B.Tech</td>
<td>6</td>
</tr>
<tr>
<td><div align="center">3</a></div></td>
<td>Rajesh George</td>
<td>MCA</td>
<td>7</td>
</tr>
<tr>
<td><div align="center">4</a></div></td>
<td>Jacob</td>
<td>Ph.D</td>
<td>8</td>
</tr>
<tr>
<td><div align="center">5</a></div></td>
<td>Feena</td>
<td>BCA</td>
<td>4</td>
</tr>
<tr>
<td><div align="center">6</a></div></td>
<td>Sachit George</td>
<td>M.Phil</td>
<td>4</td>
</tr>
</table>
************************************
but i wanted to display given below and also when i click on the heading like( id, name,qualification,experience ) id it will sort by order
and below the design in table each rows
please help me
<table width="34%" border="0" align="center">
<tr>
<td width="6%"><strong> Id</strong></td>
<td width="54%"><strong> Name</strong></td>
<td width="13%"><strong>Qualification</strong></td>
<td width="27%"><strong> Experience</strong></td>
</tr>
<tr>
<td bgcolor="#F5F5F5"><div align="center">1</a></div></td>
<td bgcolor="#F5F5F5">Anu Elias</td>
<td bgcolor="#F5F5F5">MCA</td>
<td bgcolor="#F5F5F5">4</td>
</tr>
<tr>
<td><div align="center">2</a></div></td>
<td>Martin Kurian</td>
<td>B.Tech</td>
<td>6</td>
</tr>
<tr>
<td bgcolor="#F5F5F5"><div align="center">3</a></div></td>
<td bgcolor="#F5F5F5">Rajesh George</td>
<td bgcolor="#F5F5F5">MCA</td>
<td bgcolor="#F5F5F5">7</td>
</tr>
<tr>
<td><div align="center">4</a></div></td>
<td>Jacob</td>
<td>Ph.D</td>
<td>8</td>
</tr>
<tr>
<td bgcolor="#F5F5F5"><div align="center">5</a></div></td>
<td bgcolor="#F5F5F5">Feena</td>
<td bgcolor="#F5F5F5">BCA</td>
<td bgcolor="#F5F5F5">4</td>
</tr>
<tr>
<td><div align="center">6</a></div></td>
<td>Sachit George</td>
<td>M.Phil</td>
<td>4</td>
</tr>
</table>
Paul Michael
Ranch Hand

Joined: Jul 02, 2001
Posts: 697
You might want to check this tag library:

http://displaytag.sourceforge.net/

HTH


SCJP 1.2 (89%), SCWCD 1.3 (94%), IBM 486 (90%), SCJA Beta (96%), SCEA (91% / 77%), SCEA 5 P1 (77%), SCBCD 5 (85%)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts logic:iterate problem
 
Similar Threads
Rounding off $$ amounts
How to set background color for records?
Show - Hide Functionality
Help me about html:select
Dynamic table generation in jsp