any way to use ajax with jstl customtags without duplicating tags in javascript?
Posted
by
CodeMonkeyB
on Stack Overflow
See other posts from Stack Overflow
or by CodeMonkeyB
Published on 2012-11-21T16:57:44Z
Indexed on
2012/11/21
16:59 UTC
Read the original article
Hit count: 226
I am working on a page where part of the content is loaded normally and the pages are rendered using jsps. The product images and links generated on that page are by custom jstl tags.
When the user scrolls more products are requested from the server in a JSON response and then using UnderscoreJS templates they are rendered and added to the bottom of the page. Is there any way I can use the JSTL tags in Javascript without recreating them using a javascript function (it won't be possible to re-create all of them in javascript).
What is the best way to handle this scenario? I guess I could return a rendered html response for the ajax call, but that would mean I have some ajax requests which use json and some that use rendered html...
© Stack Overflow or respective owner