Using jstl tags in a dynamically created div

Posted by George on Stack Overflow See other posts from Stack Overflow or by George
Published on 2010-03-19T19:07:14Z Indexed on 2010/03/19 20:31 UTC
Read the original article Hit count: 581

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about jstl

Related posts about AJAX