File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Show By default value in dropdown Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Show By default value in dropdown " Watch "Show By default value in dropdown " New topic
Author

Show By default value in dropdown

naval kumar
Ranch Hand

Joined: Jul 08, 2012
Posts: 37
on my jsp i have drop-down box in which i m showing counties list with key-value pairs in setting hashmap like

<bean:define id="countries" name="userForm" property="countries" />
<html:select property="country" styleClass="comboStyle" style="width:190px;">
<html:options collection="countries" property="value" labelProperty="key" />
</html:select>

and i want to show by default "India" in this drop-box. how can i do it please reply.
sankar manoharan
Greenhorn

Joined: Dec 25, 2011
Posts: 10
Check out This


http://www.tizag.com/phpT/examples/formex.php
naval kumar
Ranch Hand

Joined: Jul 08, 2012
Posts: 37
sankar manoharan wrote:Check out This


http://www.tizag.com/phpT/examples/formex.php


as provide link is very general .i am displaying the countries dynamically at the time of jsp loaded and i want to show the Country India By default in drop-down.
how can i do it??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Show By default value in dropdown
 
Similar Threads
problem on html:select html:options
LabelValueBean in struts
how to do a Pre-selected drop down in Struts
html:select help
Struts more html:select