Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
Selecting value in html:optionCollections
chetan kokil
Greenhorn
Posts: 9
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
<html:select property="selectedValue"> <html:optionsCollection..../> </html:select>
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
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can you send me the code please...if you can...
Srilakshmi Vara
Ranch Hand
Posts: 169
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
In your action/action form set the default select value to the desired value.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
what is the difference?
servlet or jsp page with prefilled forms
how can we call valueobject class in servlet
Q on object serialization
q from sun's epractice exam
More...