File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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!