Click to See Complete Forum and Search --> : Vectors


novice1986
August 25th, 2009, 10:54 AM
I have created a Vector that contains an unknown number of instances of a list containing Strings and int. I want to create a loop and remove the Strings from the vector, putting each into a SQL query. But I dont have a clue on how to loop a Vector in this way.

jcaccia
August 25th, 2009, 11:18 AM
I guess the best way to do it is using the Vector.iterator() (http://java.sun.com/javase/6/docs/api/java/util/AbstractList.html#iterator()) or Vector.listIterator() (http://java.sun.com/javase/6/docs/api/java/util/AbstractList.html#listIterator()) methods.

novice1986
August 25th, 2009, 12:08 PM
Oh thanks, I forgot all about this. Another question:

<a href="Technabling?action=searchById&id=${client.clientId"}>

I want to create a hypertext link but want a dynamic id, this seems intuitive but doesn't work. Any ideas?

jcaccia
August 26th, 2009, 03:05 AM
It seems you closed the quote before the curly bracket:
<a href="Technabling?action=searchById&id=${client.clientId"}>