Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Populate list box  RSS feed

 
Matt Hoffman
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to populate a list box that will compare the id passed from the previous page with a value that is already in the list menu. Any ideas? My list menu looks like this..

<select name="genreID">
<%
List genreList = genreData.getGenreList();
Iterator genreListIterator = genreList.iterator();
while ( genreListIterator.hasNext() ) {
genre = ( GenreBean ) genreListIterator.next();
out.println("<OPTION value=\"" + genre.getGenreID() + "\">" + genre.getGenreName());
out.println("</OPTION>");
}
%>
</select>

Any ideas?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to populate a list box that will compare the id passed from the previous page with a value that is already in the list menu. Any ideas? My list menu looks like this..


I see no comparison in your code. You'll have to explain what you are trying to do more clearly.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See http://www.coderanch.com/forums/

Why do people keep asking the same questions with only minor differences in wording?

Just one of my pet peeves
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!