• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

list elements as link calls servlet on click

 
Ranch Hand
Posts: 91
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Spring AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Spring AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
arushi tomar,

You are welcome. Kindly mark the post as resolved if you got the answer.
 
reply
    Bookmark Topic Watch Topic
  • New Topic