*
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


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??
 
GeeCON Prague 2014
 
subject: Show By default value in dropdown