• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

list elements as link calls servlet on click  RSS feed

 
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?
 
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.
 
Willie Smits increased rainfall 25% in three years by planting trees. Tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!