I have the following code to show a list to users to select an option, it correctly shows the list options but when an option is selected and the form is submitted, it runs into following error.
错误
Caused by: tag 'select', field 'list', name 'developerID': The requested list key
'listOfdevelopers' could not be resolved as a collection/array/map/enumeration/iterator type.
Example: people or people.{name} - [unknown location]
JSP
<s:form ...>
<s:select name="developerID"
label="developerID"
list="listOfdevelopers"
value="%{development.developerID}"
/>
</s:form>
我的代码
....
private Map listOfdevelopers;
private Development development = new Development();
public Map getListOfdevelopers() {
return listOfdevelopers;
}
public void setListOfdevelopers(Map listOfdevelopers) {
this.listOfdevelopers = listOfdevelopers;
}
public Development getDevelopment() {
return development;
}
public void setDevelopment(Development development) {
this.development = development;
}
@Override
public Development getModel() {
return this.development;
}
...