Using java.util.Map with WebWork <ww:select> tags
Posted on 2005-04-26
I've recently started using Opensymphony WebWork, and I'm having some trouble getting it to do what I want.
I have an action, with a getCountries() method, which returns a Map, whose keys are strings and whose values are "NamedItem"s. NamedItem is a class which (suprise) has a getName() method.
I want WebWork to create me a select box with the Hash's keys as the <option value="..."> and the name property as the option body.
I'm using the tag
<ww:select label="'Country'" name="'CountryID'" list="#countries" listValue="name" />
But this doesn't work, I just get an empty select box (no options)
L'il help here people?