• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Selecting value in html:optionCollections

 
chetan kokil
Greenhorn
Posts: 9
  • 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
  • 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
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic