<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Struts 2 pass hidden value</title>
<s:head />
</head>

<body>
	<h3 style="color: green">
		<s:text name="Struts 2 pass hidden value" />
	</h3>
	<s:if test="hasActionErrors()">
		<div id="fieldErrors">
			<s:actionerror />
		</div>
	</s:if>
	<s:form action="hiddenValueAction" namespace="/" method="post"
		name="strutsForm">


		<table cellspacing="0" cellpadding="0" border="1" width="500">
			<tr>
				<td><h3 align="center">Struts 2 pass hidden value</h3></td>
			</tr>

			<tr>
				<td><div style="height: 200px; overflow: auto;">
						<table cellspacing="0" cellpadding="0" border="0" width="100%">
							<tr>
								<td><h3>First Name</h3></td>
								<td><h3>Last Name</h3></td>
								<td><h3>Location</h3></td>
							</tr>
							<s:iterator status="stat" value="personsList">
								<tr>
									<!-- Hidden value from list-->
									<td><s:property value="firstName" /><s:hidden name="personsList.firstName" value="%{firstName}"/></td>
									<td><s:property value="lastName" /><s:hidden name="personsList.lastName" value="%{lastName}"/></td>
									<td><s:property value="location" /><s:hidden name="personsList.location" value="%{location}"/></td>									
								</tr>
							</s:iterator>
							<!-- Hidden value -->
							<s:hidden name="hiddenValue" value="hiddenValueTest" />
						</table>

					</div></td>
			</tr>

		</table>
		</br><s:submit align="left"/>
		

	</s:form>
</body>
</html>
