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 headerKey in s:select tag in struts2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "headerKey in s:select tag in struts2.0" Watch "headerKey in s:select tag in struts2.0" New topic
Author

headerKey in s:select tag in struts2.0

D kukreja
Ranch Hand

Joined: Jan 29, 2008
Posts: 39
In s:select , I am using hashmap to populate the selection box. I want the first element from the hashmap to be preselected in the selectionbox. I know that I should give this value in headerkey and headerValue. I can have 2 more string properties in Action and populate them in action and use it here. Is there any alternative way ?
Here is my tag:
<s:select label="something"
list="countries"
headerKey="${countries.key}" headerValue="${countries.value}" name="selectedCountry" emptyOption="false"/>

thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: headerKey in s:select tag in struts2.0
 
Similar Threads
Struts 2 s:div doubleselect problem ?
Struts2 Model Driven question for a complex model
How to retain value in struts 2 using <s:select></s:select> tag
Problem while implementing cascade select option in Struts2 [City/Locality/Streets]
Something wrong with my <s:select>