How to pass a value of a list to a hidden tag?
I have the following code in my jsp:
Quote:
<c:forEach var="value" items="${MyList}" varStatus="loop">
<tr><td><div id="Name1">Here:${value.name}</div></td></tr>
<s:hidden id="Name" name="Name" value="%{value.name}"/>
the html source is as following:
Quote:
<tr><td><div id="Name1">Here:My name is X</div></td></tr>
<input type="hidden" name="Name" value="" id="Name"/>
As demonstrated the div tag is showing the value.name correctly but the value attribute of hidden tag is empty. I could not find any solution because most of the solutions were not related to list.
I changed it to ${value.name} but ran into this error: "According to TLD or attribute directive in tag file, attribute value does not accept any expressions"
Re: How to pass a value of a list to a hidden tag?