This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HashMap Display Default value" Watch "HashMap Display Default value" New topic

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"/>

Now i want to display country "India" in dropdwon as default value how can i do it ???
I agree. Here's the link:
subject: HashMap Display Default value
It's not a secret anymore!