This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Best approach to populate a JSP dropdown with fixed/static list of values  RSS feed

 
Devika Bala
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a fixed list of 20+ values to be populated in a dropdown. The set of values are always going to remain the same, no future scope of modifications, additions or deletions.
Listing each of them as <option> in JSP is making the page look cluttered. Or is it better reading it as a comma-separated string from a properties file and then iterating to populate the dropdown.
Or any other suggestions.
What will be the best approach to populate such a dropdown in JSP?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Devika Bala wrote:Listing each of them as <option> in JSP is making the page look cluttered.

So? I don't really see a problem. If the list is fixed, there's no need to start adding over-complications.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!