Using jstl tags in a dynamically created div
- by George
I want to be able to show some data based on criteria the user enters in a text field. I can easily take this data, process the form post, and show the data on another page. However, I want to be able to do it all on the same page - they click the button, and a new div shows up with the information. This doesn't seem too complicated, but I want to use jstl tags to format the data like:
<c:forEach items="${model.data}" var="d">
<tr>
<td><fmt:formatDate type="date" dateStyle="short" timeStyle="default" value="${d.reportDate}" /></td>
<td><c:out value="${d.cardType}"/></td>
</tr>
</c:forEach>
If jstl tags are processed when the page loads, can I use that in this new div? Can I update it via a javascript (using prototype) function to display the proper data? Will I be able to do the same thing if they change the criteria and click the submit button again?