• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to use a variable in a jsp

 
Amrita Datta
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..

I have a very simple problem. I am using a jsp where in after I get my retreived table data from the database, I need to put a cancel button along each row.
I want on click of cancel button, that particular row value only needs to be updated accordingly.
As of now when I click on the cancel button, the entire table value gets updated and not that particular row.

This is something what I have done in my jsp

<form:form>
<tr><c:forEach items="${raisedRequest}" var="raiserequest"></tr>
<tr><cut value="${raiserequest.pickPoint}"/> </tr>
<tr><cut value="${raiserequest.facility}"/></tr>
<tr> <cut value="${raiserequest.dropPoint}" /></tr>
<input type="submit" value="CANCEL">
<br/>
</c:forEach>
</form:form>

I had used script tags to iterate the value of the button..But getting errors..Please help
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your whole story is a bit confusing and contradictory. But I think I see what you mean.
Give the button an unique name. E.g. "cancel" + rowid where rowid is the unique identifier of the row.
In the servlet you determine which cancel button is pressed (i.e. not null) and handle accordingly.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Cancel button should "update" a row ? That does not make sense.

Can you please elaborate a little more and tell us what you are trying to do ? Also please use code tags to avoid smileys popping up in your post.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!