Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to refresh c:forEach in AJAX  RSS feed

 
Baskar Sikkayan
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have c:forEach in my JSp as follows.

<c:forEach items="${profileDetails.certificationsList}"
var="certDetails" varStatus="reqStatus">
<li>
<cut value="${certDetails.certificationName}"></cut>
<c:if test="${action == 'edit'}">
<a href="">[Edit]</a>   <a href="">[Delete]</a>
</c:if>
</li>
</c:forEach>

I would like to modify this list in AJAX. I have got the response from Controller as a list using AJAX. But not sure, how to update and refresh this list alone in JSP.

Thanks,
Baskar.S


 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ajax has nothing to do with JSP once the response gets back to the client. Why are you not using a JSP to create an HTML response from the Ajax request rather than pure data?
 
abani patra
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
You can do this by getting your response as json or html to another jsp and accordingly first remove the existing item form the current page and put these data how it will fit into your
requirement.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you modify your list in you Java code? O.o
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!