This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Selecting value in html:optionCollections

 
chetan kokil
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I am a newbie to struts and want to know, how to keep selected a particular value in
<html ptionsCollection />


Expecting a favourable reply.

Thanking you
Heartly4u
 
Dom Lassy
Ranch Hand
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


In this example, your form bean should have a method called "getSelectedValue" and if the value of anything in your collection matches that value, it will be selected.
[ June 05, 2007: Message edited by: Dom Lassy ]
 
chetan kokil
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you send me the code please...if you can...
 
Srilakshmi Vara
Ranch Hand
Posts: 169
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your action/action form set the default select value to the desired value.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic