aspose file tools*
The moose likes Struts and the fly likes HashMap Display Default value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HashMap Display Default value" Watch "HashMap Display Default value" New topic
Author

HashMap Display Default value

naval kumar
Ranch Hand

Joined: Jul 08, 2012
Posts: 37
Dear , I m setting in java all the countries in hashMap like this---
countryName = cnt.getStringProperty("COUNTRY_NAME");
oid = ""+cnt.getLongProperty("OID");
countries.put(countryName, oid)

and displaying the All countries in the drop down like

<html:select property="country" styleClass="comboStyle" style="width:200px;" >
<htmlptions collection="countries" property="value" labelProperty="key"/>
</html:select>

Now i want to display country "India" in dropdwon as default value how can i do it ???
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HashMap Display Default value
 
Similar Threads
Struts Html select tag
HashMap Display Default value
problem on html:select html:options
Show By default value in dropdown
Drop Down Box in Struts - Select Default Value Implementation