Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Default selected value in optionsCollection

 
M Flournoy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know similar questions have been asked before, and I apologize, but I wasn't able to figure my problem out based on those.

I need to modify existing JSP code to have an option from a selection box be selected by default. The code I am using looks like this:



This code successfully creates the selection box and populates it accordingly, but it does not set any option as selected. The option I want to set as selected is exactly the "selDate" variable (pulled down from "pref" in the URL).

What modifications do I need to make?

Thanks,
MRF
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64967
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you are using Struts tags to implement the select element, I have moved this post to the Struts forum.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer to this question is found in the JavaRanch Struts FAQ. If after reading this, you still can't figure it out, let us know and we'll help you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic