Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

headerKey in s:select tag in struts2.0

D kukreja
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
headerKey="${countries.key}" headerValue="${countries.value}" name="selectedCountry" emptyOption="false"/>

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic