struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Chin <jus...@justinchin.com>
Subject Struts Tag Iterator formatting issue using tables
Date Fri, 29 Jun 2012 22:46:21 GMT
I am having issues getting the Struts Iterator Tag to format 
correctly.Any help would greatly be appreciated as this seems very 
simple, but clearly I missing something:

Here is my jsp:

<%@page language=/"java"/ contentType=/"text/html; charset=UTF-8" 
/pageEncoding=/"UTF-8"/%>

<%@taglib prefix=/"s"/ uri=/"/struts-tags"/%>

<html>

<head>

<title>Bulk Terminate</title>

</head>

<body>

<h1>Bulk Terminate</h1>

<tableborder=/"1"/ "width=/"100%"/>

<tr>

<td>Select User</td>

<td>Full Name</td>

<td>Job Title</td>

</tr>

<tr>

<s:iteratorvalue=/"peopleList"/>

<tr>

<td><s:checkboxname=/"fullName"/ /></td>

<td><s:propertyvalue=/"fullName"/ /></td>

<td><s:propertyvalue=/"jobTitle"/ /></td>

</tr>

</s:iterator>

</tr>

</table>

</body>

</html>


This is what it looks like in a browser:

And here is the HTML code source:

<html>

<head>

<title>Bulk Terminate</title>

</head>

<body>

<h1>Bulk Terminate</h1>

<table border="1" "width="100%">

<tr>

<td>Select User</td>

<td>Full Name</td>

<td>Job Title</td>

</tr>

<tr>

<tr>

<td>

<tr>

<td valign="top" align="right">

</td>

<td valign="top" align="left">

<input type="checkbox" name="fullName" value="true" id="fullName" 
/><input type="hidden" id="__checkbox_fullName" 
name="__checkbox_fullName" value="true" />

</td>

</tr>

</td>

<td>John Doe0</td>

<td>Job Title0</td>

</tr>

<tr>

<td>

<tr>

<td valign="top" align="right">

</td>

<td valign="top" align="left">

<input type="checkbox" name="fullName" value="true" id="fullName" 
/><input type="hidden" id="__checkbox_fullName" 
name="__checkbox_fullName" value="true" />

</td>

</tr>

</td>

<td>John Doe1</td>

<td>Job Title1</td>

</tr>

<tr>

<td>

<tr>

<td valign="top" align="right">

</td>

<td valign="top" align="left">

<input type="checkbox" name="fullName" value="true" id="fullName" 
/><input type="hidden" id="__checkbox_fullName" 
name="__checkbox_fullName" value="true" />

</td>

</tr>

</td>

<td>John Doe2</td>

<td>Job Title2</td>

</tr>

</tr>

</table>

</body>

</html>

Where did all the extra table rows and table cells come from?


Mime
View raw message