• Post Reply Bookmark Topic Watch Topic
  • New Topic

list elements as link calls servlet on click  RSS feed

 
arushi tomar
Ranch Hand
Posts: 91
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was doing this :


to display the list of customers as link with servlet ServiceApp
i had problems with the previous code so i did this :

How should i make these do the same? Call Service app on being clicked?
If I use anchor tag then how would it know for which customer I am clicking the link?
 
Partheban Udayakumar
Ranch Hand
Posts: 499
AngularJS Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
arushi tomar wrote:i had problems with the previous code

What were the problems? Your code seems fine.

arushi tomar wrote:If I use anchor tag then how would it know for which customer I am clicking the link?

See your previous code anchor tag closely you will definitely.

Hint: Concentrate on your href
 
arushi tomar
Ranch Hand
Posts: 91
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i already did it but since i was writing id instead of accountID, it wasn't working. I corrected it and it works fine now.

<th><a href="ServiceApp?accountID=<%=listCustomers.get(i).getAccountID()%>"><%=listCustomers.get(i).getCompanyName()%></a></th>

Thanks though. :)
 
Partheban Udayakumar
Ranch Hand
Posts: 499
AngularJS Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
arushi tomar,

You are welcome. Kindly mark the post as resolved if you got the answer.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!