R
Rune Runnestø
I'm trying to make a method in a jsp-file like this one:
The method has an Enumeration object and a String object as arguments. Don't
bother about the validation, it is taken care of by another method. Just
assume that it turned out OK.
<%!
public void addThisNumber(Enumeration list, String thisNumber) throws
Exception{
int oneNumber = validateThisNumber(list, thisNumber);
//the validation turned out OK, how do I add the number to the list
? Is an Iterator the solution ? Eventually, how ?
.....
.....
//the sentence below would have been right if it was an ArrayList,
but it does'n work for an Enumberation.
// alleTalla.add(new Integer(eitTall));
}
%>
Regards
Rune
The method has an Enumeration object and a String object as arguments. Don't
bother about the validation, it is taken care of by another method. Just
assume that it turned out OK.
<%!
public void addThisNumber(Enumeration list, String thisNumber) throws
Exception{
int oneNumber = validateThisNumber(list, thisNumber);
//the validation turned out OK, how do I add the number to the list
? Is an Iterator the solution ? Eventually, how ?
.....
.....
//the sentence below would have been right if it was an ArrayList,
but it does'n work for an Enumberation.
// alleTalla.add(new Integer(eitTall));
}
%>
Regards
Rune